Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2017-07-05 20:30:11 +0000
committerLars Vogel2017-07-06 17:48:32 +0000
commitfd77d32f22c6091f001d2c9819c96065dea9133e (patch)
treedbb79e5add1797f1b52c0185c860d81250093285
parentf777c68f25142d44aa3dbfbdfcfbf2a93d59e94c (diff)
downloadeclipse.platform.text-fd77d32f22c6091f001d2c9819c96065dea9133e.tar.gz
eclipse.platform.text-fd77d32f22c6091f001d2c9819c96065dea9133e.tar.xz
eclipse.platform.text-fd77d32f22c6091f001d2c9819c96065dea9133e.zip
Bug 519263 Add null guard to PositionManager#managePosition
fDocument can be null when no document is available in PaintManager#install Change-Id: I76b6351ac0e07e5bdba581af581b9d9ab15dcce6 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java
index fa2a8535ec7..03da4d53eb5 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java
@@ -147,6 +147,9 @@ public final class PaintManager implements KeyListener, MouseListener, ISelectio
*/
@Override
public void managePosition(Position position) {
+ if (fDocument == null) {
+ return;
+ }
try {
fDocument.addPosition(fCategory, position);
} catch (BadPositionCategoryException x) {

Back to the top