src/basics.cpp

changeset 1073
a0a0d581309b
parent 1072
9ce9496427f2
child 1079
67c6e5d32e68
--- a/src/basics.cpp	Sat Jan 28 17:47:06 2017 +0200
+++ b/src/basics.cpp	Sun Jan 29 15:05:14 2017 +0200
@@ -151,11 +151,13 @@
 		break;
 
 	case OBJ_SubfileReference:
-		for (LDObject* it : static_cast<LDSubfileReference*> (obj)->inlineContents (true, false))
-		{
-			calcObject (it);
-			it->destroy();
-		}
+	    {
+		    Model model;
+			static_cast<LDSubfileReference*>(obj)->inlineContents(model, true, false);
+
+			for (LDObject* it : model.objects())
+				calcObject(it);
+	    }
 		break;
 
 	default:

mercurial