src/share/classes/sun/awt/SunToolkit.java

Print this page

        

@@ -554,19 +554,23 @@
         flushLock.lock();
         try {
             // Don't call flushPendingEvents() recursively
             if (!isFlushingPendingEvents) {
                 isFlushingPendingEvents = true;
+                try {
                 AppContext appContext = AppContext.getAppContext();
                 PostEventQueue postEventQueue =
                     (PostEventQueue)appContext.get(POST_EVENT_QUEUE_KEY);
                 if (postEventQueue != null) {
                     postEventQueue.flush();
                 }
             }
-        } finally {
+                finally {
             isFlushingPendingEvents = false;
+                }
+            }
+        } finally {
             flushLock.unlock();
         }
     }
 
     public static boolean isPostEventQueueEmpty()  {