tmf: Fix SWTException in TimeGraphMarkerAxis
authorPatrick Tasse <patrick.tasse@gmail.com>
Thu, 24 Mar 2016 21:18:07 +0000 (17:18 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Mon, 28 Mar 2016 18:48:30 +0000 (14:48 -0400)
The zoom thread can call setMarkers() while the view containing the time
graph has been closed in the meantime, causing a SWTException: Widget is
disposed.

Change-Id: I586b3835fdee958e5e7c558f000954a3de5db616
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/69282
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphMarkerAxis.java

index 7634abc9b9e1be1bb72578a6df78670e20e98060..8a66e16d117e3b2b553b0e3432e87d583535e2c0 100644 (file)
@@ -194,6 +194,9 @@ public class TimeGraphMarkerAxis extends TimeGraphBaseControl {
             map.put(marker.getCategory(), marker);
         }
         Display.getDefault().asyncExec(() -> {
+            if (isDisposed()) {
+                return;
+            }
             fMarkers = map;
             getParent().layout();
             redraw();
This page took 0.026565 seconds and 5 git commands to generate.