src/toolsets/filetoolset.cpp

changeset 1263
0256edecda54
parent 1257
0d42a1ebd954
child 1269
ec691d9472b3
--- a/src/toolsets/filetoolset.cpp	Sat Mar 03 17:28:27 2018 +0200
+++ b/src/toolsets/filetoolset.cpp	Sat Mar 03 17:47:40 2018 +0200
@@ -175,9 +175,10 @@
 	for (LDObject* object : selectedObjects())
 	{
 		LDSubfileReference* reference = dynamic_cast<LDSubfileReference*>(object);
+		LDDocument* referenceDocument = reference ? reference->fileInfo(m_documents) : nullptr;
 
-		if (reference and reference->fileInfo()->isFrozen())
-			m_window->openDocumentForEditing(reference->fileInfo());
+		if (referenceDocument and referenceDocument->isFrozen())
+			m_window->openDocumentForEditing(referenceDocument);
 	}
 }
 

mercurial