Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-04-26 08:03:11 -0400
committerUwe Stieber2013-04-26 08:03:11 -0400
commit3bd28d2760e1611962d135eeee0512093df8c253 (patch)
tree9dc82c35c7d4656d8356de6655fab719c9b2cd71 /target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf
parentac93f2e92768e5897c368cc1dc61891cae13c642 (diff)
downloadorg.eclipse.tcf-3bd28d2760e1611962d135eeee0512093df8c253.tar.gz
org.eclipse.tcf-3bd28d2760e1611962d135eeee0512093df8c253.tar.xz
org.eclipse.tcf-3bd28d2760e1611962d135eeee0512093df8c253.zip
Target Explorer: Fix illegal thread access while disposing the content provider
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java
index e0c385939..7a3eda431 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ContentProviderDelegate.java
@@ -456,7 +456,14 @@ public class ContentProviderDelegate implements ICommonContentProvider, ITreePat
@Override
public void dispose() {
if (modelListener != null) {
- Model.getModel().removeListener(modelListener);
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ Model.getModel().removeListener(modelListener);
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
modelListener = null;
}

Back to the top