From d6c893516391ebb94456701496ff702d0ca4bc72 Mon Sep 17 00:00:00 2001 From: MSementsov-Ibk Date: Mon, 8 Oct 2018 08:42:32 +0200 Subject: [PATCH] Fixed Problems with this method if setGraphics was never called and there was no run Signed-off-by: Michael Sementsov --- .../udig/tools/edit/animation/MessageBubble.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/org.locationtech.udig.tool.edit/src/org/locationtech/udig/tools/edit/animation/MessageBubble.java b/plugins/org.locationtech.udig.tool.edit/src/org/locationtech/udig/tools/edit/animation/MessageBubble.java index 85dd1872e3..f5a59ec45f 100644 --- a/plugins/org.locationtech.udig.tool.edit/src/org/locationtech/udig/tools/edit/animation/MessageBubble.java +++ b/plugins/org.locationtech.udig.tool.edit/src/org/locationtech/udig/tools/edit/animation/MessageBubble.java @@ -221,8 +221,10 @@ public void setTextColor( Color textColor ) { @Override public void setValid( boolean valid ) { super.setValid(valid); - display.removeMouseListener(mouseListener); - display.removeMouseWheelListener(wheelListener); + if (display != null) { + display.removeMouseListener(mouseListener); + display.removeMouseWheelListener(wheelListener); + } } private MapMouseListener mouseListener=new MapMouseListener(){