]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "New parametrisation of OpenDiagramFromConfigurationAdapter.openEditor"
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 20 Sep 2018 15:01:26 +0000 (15:01 +0000)
committerGerrit Code Review <gerrit2@simantics>
Thu, 20 Sep 2018 15:01:26 +0000 (15:01 +0000)
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java

index a4f32e81139a5f22d699af3e7d15a5ee7ba3578b..d86925e485d187ef8d48e25535a091ffbcb5facd 100644 (file)
@@ -159,8 +159,8 @@ public class ConnectionPointNameStyle extends StyleBase<List<ConnectionPointName
         // always clean up old items before drawing new items
         cleanupStyleForNode(_node);
 
-        int count = resultList.size();
-        if (resultList == null || count < 2)
+        int count = resultList != null ? resultList.size() : 0;
+        if (count < 2)
             return;
 
         G2DParentNode parentNode = ProfileVariables.claimChild(_node, "", PARENT_NODE_NAME_PREFIX, G2DParentNode.class, observer);