From fccc8f9d20c8fbb4ac8e601aa1fcfcc1e0075cab Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Wed, 20 Dec 2017 08:34:26 +0200 Subject: [PATCH] Fix possible NPE in SCLExpressionIssueProvider refs #7689 Change-Id: If7c4cad3b5ae238d90dd03e1d40f2aec2f597276 --- .../modeling/scl/issue/SCLExpressionIssueProvider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java index fbba1546f..7e480d4ff 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/issue/SCLExpressionIssueProvider.java @@ -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); -- 2.47.1