Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp	(revision 71101)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp	(revision 71102)
@@ -421,7 +421,12 @@
 {
     /* First, we should check whether the screen is valid: */
-    QScreen *pScreen = iHostScreenIndex == -1
-                     ? QGuiApplication::primaryScreen()
-                     : QGuiApplication::screens().value(iHostScreenIndex);
+    QScreen *pScreen = 0;
+    if (iHostScreenIndex == -1)
+    {
+        pScreen = QGuiApplication::primaryScreen();
+        iHostScreenIndex = QGuiApplication::screens().indexOf(pScreen);
+    }
+    else
+        pScreen = QGuiApplication::screens().value(iHostScreenIndex);
     AssertPtrReturn(pScreen, 1.0);
 
