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 29, 2024
1 parent 835e0fe commit e6d3d29
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 e6d3d29

Please sign in to comment.