]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java
Fix possible NPE in SCLExpressionIssueProvider
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / scl / issue / SCLExpressionIssueProvider.java
index fbba1546ffbc2a0e81a75c95bea69c6e290b9584..7e480d4ffa1218276448b00fbcf8a64e48cebdec 100644 (file)
@@ -145,7 +145,11 @@ public class SCLExpressionIssueProvider implements SCLIssueProvider {
             if (!graph.hasStatement(parameter))
                 return null;
             
-            Variable componentVariable = Variables.getVariable(graph, parameter);
+            Variable componentVariable = Variables.getPossibleVariable(graph, parameter);
+            if (componentVariable == null) {
+                // Resource might be deleted already and therefore no URI available for variable building
+                return null;
+            }
             Variable propertyVariable = componentVariable.getProperty(graph, parameter2);
             
             Variable typeVariable = Variables.getVariable(graph, type);