Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2016-10-11 16:03:25 +0000
committerStéphane Bégaudeau2016-10-11 16:03:56 +0000
commitf878e110ea75d85027d699894a07e551f977d4c4 (patch)
tree859469f58afc5a47b78a6239f56565dd30108d53
parent9b13dc434ea34e104b4471d4f86f87ea74b32a59 (diff)
downloadorg.eclipse.eef-f878e110ea75d85027d699894a07e551f977d4c4.tar.gz
org.eclipse.eef-f878e110ea75d85027d699894a07e551f977d4c4.tar.xz
org.eclipse.eef-f878e110ea75d85027d699894a07e551f977d4c4.zip
[505728] NPE in AbstractEEFWidgetLifecycleManager
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=505728 Change-Id: Ie9e9551771f44bd0800507a08ab6005104d96605 Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java
index ca1667b3d..8e2d0b629 100644
--- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java
+++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java
@@ -268,25 +268,27 @@ public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifec
}
});
- this.mouseTrackListener = new MouseTrackListener() {
+ if (this.help != null) {
+ this.mouseTrackListener = new MouseTrackListener() {
- @Override
- public void mouseHover(MouseEvent e) {
- // Defer the computation of the help message when the user hovers the Help label
- getController().computeHelp();
- }
+ @Override
+ public void mouseHover(MouseEvent e) {
+ // Defer the computation of the help message when the user hovers the Help label
+ getController().computeHelp();
+ }
- @Override
- public void mouseExit(MouseEvent e) {
- // Nothing todo
- }
+ @Override
+ public void mouseExit(MouseEvent e) {
+ // Nothing todo
+ }
- @Override
- public void mouseEnter(MouseEvent e) {
- // Nothing todo
- }
- };
- this.help.addMouseTrackListener(mouseTrackListener);
+ @Override
+ public void mouseEnter(MouseEvent e) {
+ // Nothing todo
+ }
+ };
+ this.help.addMouseTrackListener(mouseTrackListener);
+ }
}
/**
@@ -330,7 +332,7 @@ public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifec
@Override
public void aboutToBeHidden() {
super.aboutToBeHidden();
- if (!this.help.isDisposed()) {
+ if (this.help != null && !this.help.isDisposed()) {
this.help.removeMouseTrackListener(mouseTrackListener);
}

Back to the top