Fix NPE in surround (EA-141193)
This commit is contained in:
+3
@@ -62,6 +62,9 @@ public abstract class KotlinIfSurrounderBase extends KotlinStatementsSurrounder
|
|||||||
container.deleteChildRange(statements[0], statements[statements.length - 1]);
|
container.deleteChildRange(statements[0], statements[statements.length - 1]);
|
||||||
|
|
||||||
ifExpression = CodeInsightUtilBase.forcePsiPostprocessAndRestoreElement(ifExpression);
|
ifExpression = CodeInsightUtilBase.forcePsiPostprocessAndRestoreElement(ifExpression);
|
||||||
|
if (ifExpression == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return getRange(editor, ifExpression);
|
return getRange(editor, ifExpression);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user