]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
drawing shadows for dependency arrows results in nullpointerexception 43/2943/1
authorJani Mäkinen <jani.makinen@semantum.fi>
Wed, 12 Jun 2019 07:09:50 +0000 (10:09 +0300)
committerJani Mäkinen <jani.makinen@semantum.fi>
Wed, 12 Jun 2019 07:09:50 +0000 (10:09 +0300)
gitlab #48

Change-Id: If9ce3ab1c10529e62d114d88963259e73d533226

bundles/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements/profiles/ShadowStyle.java

index ee0f442bcf2de267f479906a3ba5639debaccc4b..e8616af9238789ab8bd0c7d47a3a0e57b5a0777b 100644 (file)
@@ -62,7 +62,7 @@ public class ShadowStyle extends StyleBase<ShadowResult> {
             if(original != null) {\r
                 Collection<Resource> otherShadows = graph.getObjects(original, SR.Shadow_original_Inverse);\r
                 otherShadows.remove(component);\r
-                if(selection.equals(original) || otherShadows.contains(selection)) {\r
+                if(original.equals(selection) || otherShadows.contains(selection)) { // If r is connection, selection is null\r
                     return new ShadowResult(Style.SHADOW, transform);\r
                 }\r
             }\r