Skip to content

Commit

Permalink
fix NPE
Browse files Browse the repository at this point in the history
Fixed #4
  • Loading branch information
LinWanCen committed Jun 30, 2022
1 parent ab8b4c4 commit eadceb5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ static PsiDocComment elementDoc(PsiElement element, PsiElement psiIdentifier,
if (psiIdentifier != null && "Override".equals(psiIdentifier.getText())) {
ProjectSettingsState projectSettings = ProjectSettingsState.getInstance(psiIdentifier.getProject());
PsiMethod psiMethod = PsiTreeUtil.getParentOfType(psiIdentifier, PsiMethod.class);
if (psiMethod == null) {
return null;
}
PsiDocComment docComment = OwnerToPsiDocUtils.supperMethodDoc(psiMethod);
return SkipUtils.skipDoc(docComment, instance, projectSettings);
}
Expand Down

0 comments on commit eadceb5

Please sign in to comment.