]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Added a null check to selection processor. (fixes #3796)
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 19 Oct 2012 07:31:15 +0000 (07:31 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 19 Oct 2012 07:31:15 +0000 (07:31 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26075 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java

index 0b623ee4130ddb0d21e8db0a8b469f6e7af1ca11..ad10dd617ed84aa6b2faeda2a2f2b9c4211db94e 100644 (file)
@@ -118,7 +118,8 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if(r == null) {\r
                 // Selection is not directly a resource, try if it is a variable \r
                 var = AdaptionUtils.adaptToSingle(selection, Variable.class);\r
-                r = var.getRepresents(backend);\r
+                if(var != null)\r
+                    r = var.getRepresents(backend);\r
             }\r
 \r
             if(r == null) {\r