[580831] NPE in org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy.getIndexedRegions()
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java
index 4d4df83..6ab801a 100644
--- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java
+++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2020 IBM Corporation and others.
+ * Copyright (c) 2009, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -503,6 +503,8 @@
int offset = structuredDocumentRegion.getStartOffset();
IndexedRegion indexedRegion = model.getIndexedRegion(offset);
+ if (indexedRegion == null)
+ continue;
indexedRegions.add(indexedRegion);
if (structuredDocumentRegion.getEndOffset() <= indexedRegion.getEndOffset())
continue;