Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp	(revision 50373)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp	(revision 50374)
@@ -190,6 +190,6 @@
              * and sending a cancel to the state change event wait, see below.
              */
-            if (   RT_FAILURE(pHost->nextStateChangeEvent())
-                && !pHost->mHostEventThreadStopping)
+            int rc = pHost->nextStateChangeEvent();
+            if (RT_FAILURE(rc) && !pHost->mHostEventThreadStopping)
             {
                 /* If we are not stopping, sleep for a bit to avoid using up too
