Check if element is valid before checking it's writable
Otherwise it may lead to exception
This commit is contained in:
@@ -87,7 +87,7 @@ public abstract class ChangeFunctionSignatureFix extends JetIntentionAction<PsiE
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (PsiElement declaration : declarations) {
|
for (PsiElement declaration : declarations) {
|
||||||
if (!QuickFixUtil.canModifyElement(declaration)) {
|
if (!declaration.isValid() || !QuickFixUtil.canModifyElement(declaration)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user