Index: /trunk/src/VBox/Main/glue/EventQueue.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/EventQueue.cpp	(revision 46651)
+++ /trunk/src/VBox/Main/glue/EventQueue.cpp	(revision 46652)
@@ -58,5 +58,5 @@
         (*it)->Release();
         it = mEvents.erase(it);
-            }
+    }
 }
 
@@ -95,6 +95,8 @@
             int rc2 = RTCritSectLeave(&mCritSect);
             AssertRC(rc2);
-    }
-    }
+        }
+    }
+    else
+        fWait = false;
 
     if (fWait)
@@ -129,12 +131,12 @@
                 pEvent->handler();
                 pEvent->Release();
-    }
-    else
-    {
+            }
+            else
+            {
                 int rc2 = RTCritSectLeave(&mCritSect);
                 if (RT_SUCCESS(rc))
                     rc = rc2;
-        }
-    }
+            }
+        }
     }
 
@@ -168,5 +170,5 @@
     if (RT_SUCCESS(rc))
     {
-       try
+        try
         {
             if (pEvent)
