X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Ftypicals%2FSyncTypicalTemplatesToInstances.java;h=8a0b1ddbca77e0f81fd283d8445c715e8c2e5adb;hp=7c1fe461a5e14218991f87224c8ec1d47e42a16e;hb=ad5b573b5db77a3e00429fc24e2de855bce7f48a;hpb=fa0b5e5d3c4561af251471c5a5e0511f3ca65a16 diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java index 7c1fe461a..8a0b1ddbc 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java @@ -459,6 +459,8 @@ public class SyncTypicalTemplatesToInstances extends WriteRequest { private boolean isSynchronizedConnector(ReadGraph graph, Resource templateConnection, Resource instanceConnector) throws DatabaseException { DiagramResource DIA = DiagramResource.getInstance(graph); Resource instanceConnection = graph.getPossibleObject(instanceConnector, DIA.IsConnectorOf); + if (instanceConnection == null) + return false; return graph.hasStatement(instanceConnection, MOD.HasElementSource, templateConnection) // If the master connection has been removed, this is all that's left // to identify a connection that at least was originally synchronized