Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2017-07-05 16:30:11 -0400
committerLars Vogel2017-07-06 13:48:32 -0400
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 fa2a8535e..03da4d53e 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