Index: /trunk/src/VBox/Runtime/r3/win/semevent-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/semevent-win.cpp	(revision 25656)
+++ /trunk/src/VBox/Runtime/r3/win/semevent-win.cpp	(revision 25657)
@@ -205,6 +205,6 @@
         case WAIT_FAILED:
         {
+            int rc2 = RTErrConvertFromWin32(GetLastError());
             AssertMsgFailed(("Wait on EventSem %p failed, rc=%d lasterr=%d\n", pThis, rc, GetLastError()));
-            int rc2 = RTErrConvertFromWin32(GetLastError());
             if (rc2)
                 return rc2;
Index: /trunk/src/VBox/Runtime/r3/win/semeventmulti-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/semeventmulti-win.cpp	(revision 25656)
+++ /trunk/src/VBox/Runtime/r3/win/semeventmulti-win.cpp	(revision 25657)
@@ -228,6 +228,6 @@
         case WAIT_FAILED:
         {
+            int rc2 = RTErrConvertFromWin32(GetLastError());
             AssertMsgFailed(("Wait on EventMultiSem %p failed, rc=%d lasterr=%d\n", pThis, rc, GetLastError()));
-            int rc2 = RTErrConvertFromWin32(GetLastError());
             if (rc2)
                 return rc2;
