]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed NPE from ConnectionPointNameStyle.applyStyleForNode 11/2211/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 20 Sep 2018 12:45:46 +0000 (15:45 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 20 Sep 2018 12:46:20 +0000 (12:46 +0000)
gitlab #129

Change-Id: I7d5f3be3cc695e5a6e8f9cf131fcc24b275a5e85

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);