Browse Source

Fixes deadlock in OSD plugin

Change-Id: I9159dabef8f2481529fbc7ba92c5085d0153e34e
Reviewed-on: http://gerrit.dmdirc.com/633
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.3
Simon Mott 14 years ago
parent
commit
14827c7250
1 changed files with 7 additions and 8 deletions
  1. 7
    8
      src/com/dmdirc/addons/osd/OsdManager.java

+ 7
- 8
src/com/dmdirc/addons/osd/OsdManager.java View File

@@ -112,12 +112,11 @@ public class OsdManager {
112 112
         final int startY = IdentityManager.getGlobalConfig().getOptionInt(plugin.
113 113
                 getDomain(), "locationY");
114 114
 
115
-        UIUtilities.invokeAndWait(new Runnable() {
116
-
117
-            /** {@inheritDoc} */
118
-            @Override
119
-            public void run() {
120
-                synchronized (OsdManager.this) {
115
+        synchronized (OsdManager.this) {
116
+            UIUtilities.invokeAndWait(new Runnable() {
117
+                /** {@inheritDoc} */
118
+                @Override
119
+                public void run() {
121 120
                     windowList.remove(window);
122 121
                     window.dispose();
123 122
                     for (OsdWindow otherWindow : getWindowList()) {
@@ -134,8 +133,8 @@ public class OsdManager {
134 133
                         }
135 134
                     }
136 135
                 }
137
-            }
138
-        });
136
+            });
137
+        }
139 138
         displayWindows();
140 139
     }
141 140
 

Loading…
Cancel
Save