diff options
author | Andrey Loskutov | 2020-02-18 08:28:08 +0000 |
---|---|---|
committer | Andrey Loskutov | 2020-02-18 08:28:08 +0000 |
commit | 8994bae2444db3e4711f0bf2a07519b65e63d79b (patch) | |
tree | 89cf3bbcf88a9780d02ab413b694a5a303c9d21d | |
parent | 811f8c8b6f1df4f8d156553f8a32e787177c8500 (diff) | |
download | eclipse.platform.text-8994bae2444db3e4711f0bf2a07519b65e63d79b.tar.gz eclipse.platform.text-8994bae2444db3e4711f0bf2a07519b65e63d79b.tar.xz eclipse.platform.text-8994bae2444db3e4711f0bf2a07519b65e63d79b.zip |
Bug 560259 - NPE inY20200219-1055Y20200219-0850Y20200218-1420Y20200218-1210X20200221-1130X20200221-0700X20200221-0440X20200221-0310X20200221-0050X20200220-1900X20200220-0700X20200219-1900X20200219-0700X20200219-0500S4_15_0_M3I20200221-1800I20200219-1800I20200219-0600I20200218-1800
InlinedAnnotationSupport$UpdateStylesWidth.applyTextPresentation
Added null check for ISourceViewer.getAnnotationModel() return value
that allowed to be null.
Change-Id: Ib0ffbbd3cdec18dc24a0c9de4a8c32ab8f24abe7
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java index c74ff5ea951..6682ad74e79 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java @@ -103,6 +103,9 @@ public class InlinedAnnotationSupport { @Override public void applyTextPresentation(TextPresentation textPresentation) { IAnnotationModel annotationModel= fViewer.getAnnotationModel(); + if (annotationModel == null) { + return; + } IRegion region= textPresentation.getExtent(); ((IAnnotationModelExtension2) annotationModel) .getAnnotationIterator(region.getOffset(), region.getLength(), true, true) |