Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRüdiger Herrmann2016-10-24 21:22:28 +0000
committerAndrey Loskutov2016-11-05 21:46:58 +0000
commit1c1763096e31aaccc4444dc78cbfb3cbc6979d03 (patch)
tree077a77d40020d6f06318325858c42c9518b24480 /org.eclipse.jface.text
parentc54a6055d460951ecdbcf51eaba19c346370a783 (diff)
downloadeclipse.platform.text-1c1763096e31aaccc4444dc78cbfb3cbc6979d03.tar.gz
eclipse.platform.text-1c1763096e31aaccc4444dc78cbfb3cbc6979d03.tar.xz
eclipse.platform.text-1c1763096e31aaccc4444dc78cbfb3cbc6979d03.zip
Bug 506427 - Insufficient is-disposed check in LineNumberRulerColumn::redraw
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Change-Id: I0ef8ae88f5612cb0c7302bbe37df9836f5f22d27
Diffstat (limited to 'org.eclipse.jface.text')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
index 384dfc3a7..2d944d157 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
@@ -10,6 +10,7 @@
* Nikolay Botev <bono8106@hotmail.com> - [rulers] Shift clicking in line number column doesn't select range - https://bugs.eclipse.org/bugs/show_bug.cgi?id=32166
* Nikolay Botev <bono8106@hotmail.com> - [rulers] Clicking in line number ruler should not trigger annotation ruler - https://bugs.eclipse.org/bugs/show_bug.cgi?id=40889
* Florian Weßling <flo@cdhq.de> - [rulers] Line numbering was wrong when word wrap was active - https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779
+ * Rüdiger Herrmann - Insufficient is-disposed check in LineNumberRulerColumn::redraw - https://bugs.eclipse.org/bugs/show_bug.cgi?id=506427
*******************************************************************************/
package org.eclipse.jface.text.source;
@@ -872,7 +873,7 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
return;
}
- if (fCachedTextViewer != null && fCanvas != null && !fCanvas.isDisposed()) {
+ if (!isDisposed()) {
if (VerticalRuler.AVOID_NEW_GC) {
fCanvas.redraw();
fCanvas.update();
@@ -884,6 +885,11 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
}
}
+ private boolean isDisposed() {
+ return fCachedTextViewer == null || fCanvas == null || fCanvas.isDisposed()
+ || fCachedTextViewer.getTextWidget() == null;
+ }
+
@Override
public void setModel(IAnnotationModel model) {
}

Back to the top