Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2017-05-23 07:45:38 +0000
committerPierre-Charles David2017-05-23 07:45:41 +0000
commitbcdf84db921091e20e35308f1ed3451f8fc7c362 (patch)
tree713093889850b7d4760164bd1c6978be35b02d71
parentcd68d6bbc4450fc6b7673d2daaf0a3410d26751f (diff)
downloadorg.eclipse.sirius-bcdf84db921091e20e35308f1ed3451f8fc7c362.tar.gz
org.eclipse.sirius-bcdf84db921091e20e35308f1ed3451f8fc7c362.tar.xz
org.eclipse.sirius-bcdf84db921091e20e35308f1ed3451f8fc7c362.zip
[510040] Fix potential IllegalStateException
The callback is called in async, so it may be executed at a time the widgets have been disposed. Bug: 510040 Change-Id: I405970ae6bd36a5f14a944396ba760d783bfb1a2 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/graphicalcomponents/GraphicalRepresentationHandler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/graphicalcomponents/GraphicalRepresentationHandler.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/graphicalcomponents/GraphicalRepresentationHandler.java
index 68260d6ee6..9058827095 100644
--- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/graphicalcomponents/GraphicalRepresentationHandler.java
+++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/graphicalcomponents/GraphicalRepresentationHandler.java
@@ -161,7 +161,9 @@ public class GraphicalRepresentationHandler implements SessionManagerListener {
// a model may have been added/removed from the model so we have to update content that is
// relative to loaded models.
PlatformUI.getWorkbench().getDisplay().asyncExec(() -> {
- initInput();
+ if (!treeViewer.getTree().isDisposed()) {
+ initInput();
+ }
});
}
break;

Back to the top