Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-11-28 22:15:58 +0000
committerAndrey Loskutov2017-11-28 22:15:58 +0000
commitb7a0de702cc68c0768dca3f44f97a4fce211c693 (patch)
tree377cafc62913a9ecc311a8a51b8a0bf67debe47d
parent40bf7f97e45fa3a2fb9419608d653b1d2d50c612 (diff)
downloadeclipse.platform.text-b7a0de702cc68c0768dca3f44f97a4fce211c693.tar.gz
eclipse.platform.text-b7a0de702cc68c0768dca3f44f97a4fce211c693.tar.xz
eclipse.platform.text-b7a0de702cc68c0768dca3f44f97a4fce211c693.zip
Bug 527886 - NullPointerException in Geometry.toDisplay
Change-Id: I94a5e9985d7a64e5f173342e8afe9d6a9aa0877f Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewerHoverManager.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewerHoverManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewerHoverManager.java
index de9da1cea86..45ddb92c4bf 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewerHoverManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewerHoverManager.java
@@ -222,18 +222,19 @@ class TextViewerHoverManager extends AbstractHoverInformationControlManager impl
*/
@Override
protected void presentInformation() {
- if (fTextViewer == null)
+ if (fTextViewer == null) {
return;
+ }
StyledText textWidget= fTextViewer.getTextWidget();
if (textWidget != null && !textWidget.isDisposed()) {
Display display= textWidget.getDisplay();
- if (display == null)
+ if (display == null) {
return;
+ }
- display.asyncExec(new Runnable() {
- @Override
- public void run() {
+ display.asyncExec(() -> {
+ if (!textWidget.isDisposed()) {
doPresentInformation();
}
});

Back to the top