Fail safe import fixes made by Antti
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / ModelTransferableGraphSource.java
index f0a0893eb447d40455835d39fdd41cc40d6e3c5f..1d3cf61f54c6c6ad296b06a959f62dac66601537 100644 (file)
@@ -416,8 +416,12 @@ public class ModelTransferableGraphSource implements TransferableGraphSource {
                
                if(state.internalEntries != null) {
                        for(InternalEntry ie : state.internalEntries) {
-                               if(ie.parent != null && ie.name != null) {
-                                       procedure.execute(resolveInternal(graph, support, ie, internalMap));
+                           if(ie.parent != null) {
+                               if(ie.name != null) {
+                                   procedure.execute(resolveInternal(graph, support, ie, internalMap));
+                           } else {
+                               // In this case there is a child that has no HasName => this should be treated as a blank
+                               }
                                } else {
                                        throw new DatabaseException("Invalid internal entry " + ie);
                                }