Skip to content

Commit

Permalink
Added a null check
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-suliga committed Nov 6, 2024
1 parent 1eb20c6 commit 47b16ed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ private void update(FoldingStructureComputationContext ctx) {
* position update and keep the old range, in order to keep the folding structure
* stable.
*/
boolean isMalformedAnonymousType= newPosition.getOffset() == 0 && element.getElementType() == IJavaElement.TYPE && isInnerType((IType) element);
boolean isMalformedAnonymousType= newPosition.getOffset() == 0 && element != null && element.getElementType() == IJavaElement.TYPE && isInnerType((IType) element);
List<Tuple> annotations= oldStructure.get(element);
if (annotations == null) {
if (!isMalformedAnonymousType)
Expand Down

0 comments on commit 47b16ed

Please sign in to comment.