PT #166273505: Guard against no AST node for offset in YAML

This commit is contained in:
BoykoAlex
2019-06-05 11:51:11 -04:00
parent 83d7ddecd7
commit bdd9c1c828

View File

@@ -91,7 +91,10 @@ public class YamlPropertiesJavaDefinitionHandler implements DefinitionHandler, L
if (assistContext != null) {
if (path.pointsAtValue()) {
return assistContext.getDefinitionsForPropertyValue(getNodeRegion(ast, offset));
DocumentRegion nodeRegion = getNodeRegion(ast, offset);
if (nodeRegion != null) {
return assistContext.getDefinitionsForPropertyValue(nodeRegion);
}
} else {
return assistContext.getDefinitionsForPropertyKey();
}