commit | fefa770e94b6fc411b108487e144aeff2946bd06 | [log] [tgz] |
---|---|---|
author | nitind <nitind> | Sat Oct 11 01:12:21 2008 +0000 |
committer | nitind <nitind> | Sat Oct 11 01:12:21 2008 +0000 |
tree | 4f772c58bccafe46c6a9d68ed4159b2b85003dfa | |
parent | f75dd1c0775ab223f807bfed37f4bcf10d086066 [diff] |
[248039] NPE in "processing dirty regions"
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java index e94980d..6e120a8 100644 --- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java +++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java
@@ -633,7 +633,7 @@ beginProcessing(); DirtyRegion[] toRefresh = getRequests(); - for (int i = 0; i < toRefresh.length; i++) { + for (int i = 0; i < toRefresh.length && fDocument != null; i++) { if (monitor.isCanceled()) throw new OperationCanceledException(); process(toRefresh[i]);
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java index 97e0f51..a8ae6ea 100644 --- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java +++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java
@@ -73,8 +73,9 @@ } /* single spell-check for everything to ensure that SpellingProblem offsets are correct */ IReconcilingStrategy spellingStrategy = getSpellcheckStrategy(); - if (spellingStrategy != null) { - getSpellcheckStrategy().reconcile(new Region(0, getDocument().getLength())); + IDocument document = getDocument(); + if (spellingStrategy != null && document != null) { + getSpellcheckStrategy().reconcile(new Region(0, document.getLength())); } }