diff options
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/AbstractInlinedAnnotation.java')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/AbstractInlinedAnnotation.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/AbstractInlinedAnnotation.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/AbstractInlinedAnnotation.java index 28e80553d42..5fd7a0c9ab6 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/AbstractInlinedAnnotation.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/AbstractInlinedAnnotation.java @@ -88,7 +88,11 @@ public abstract class AbstractInlinedAnnotation extends Annotation { final Position computeWidgetPosition() { if (fViewer instanceof ITextViewerExtension5) { IRegion region= ((ITextViewerExtension5) fViewer).modelRange2WidgetRange(new Region(position.getOffset(), position.getLength())); - return new Position(region.getOffset(), region.getLength()); + if (region != null) { + return new Position(region.getOffset(), region.getLength()); + } else { + return null; + } } return position; } |