Index: /trunk/src/VBox/Main/include/DisplayImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/DisplayImpl.h	(revision 75447)
+++ /trunk/src/VBox/Main/include/DisplayImpl.h	(revision 75448)
@@ -322,4 +322,5 @@
     static DECLCALLBACK(int)   i_drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
     static DECLCALLBACK(void)  i_drvDestruct(PPDMDRVINS pDrvIns);
+    static DECLCALLBACK(void)  i_drvPowerOff(PPDMDRVINS pDrvIns);
     static DECLCALLBACK(int)   i_displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM,
                                                        uint32_t cbLine, uint32_t cx, uint32_t cy);
Index: /trunk/src/VBox/Main/src-client/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 75447)
+++ /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 75448)
@@ -3237,6 +3237,6 @@
 }
 #endif
-
 #ifdef VBOX_WITH_CRHGSMI
+
 void Display::i_setupCrHgsmiData(void)
 {
@@ -3286,4 +3286,5 @@
     RTCritSectRwLeaveExcl(&mCrOglLock);
 }
+
 #endif /* VBOX_WITH_CRHGSMI */
 
@@ -4476,16 +4477,17 @@
 
 /**
- * Destruct a display driver instance.
- *
- * @returns VBox status code.
- * @param   pDrvIns     The driver instance data.
+ * @interface_method_impl{PDMDRVREG,pfnPowerOff,
+ *  Tries to ensure no client calls gets to HGCM or the VGA device from here on.}
  */
-DECLCALLBACK(void) Display::i_drvDestruct(PPDMDRVINS pDrvIns)
-{
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+DECLCALLBACK(void) Display::i_drvPowerOff(PPDMDRVINS pDrvIns)
+{
     PDRVMAINDISPLAY pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY);
     LogRelFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
 
-    pThis->pUpPort->pfnSetRenderVRAM(pThis->pUpPort, false);
+    /*
+     * Do much of the work that i_drvDestruct does.
+     */
+    if (pThis->pUpPort)
+        pThis->pUpPort->pfnSetRenderVRAM(pThis->pUpPort, false);
 
     pThis->IConnector.pbData     = NULL;
@@ -4504,6 +4506,55 @@
         pThis->pDisplay->i_destructCrHgsmiData();
 #endif
+#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI)
+        pThis->pVBVACallbacks = NULL;
+#endif
+    }
+}
+
+
+/**
+ * Destruct a display driver instance.
+ *
+ * @returns VBox status code.
+ * @param   pDrvIns     The driver instance data.
+ */
+DECLCALLBACK(void) Display::i_drvDestruct(PPDMDRVINS pDrvIns)
+{
+    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+    PDRVMAINDISPLAY pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY);
+    LogRelFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));
+
+    /*
+     * We repeat much of what i_drvPowerOff does in case it wasn't called.
+     * In addition we sever the connection between us and the display.
+     */
+    if (pThis->pUpPort)
+        pThis->pUpPort->pfnSetRenderVRAM(pThis->pUpPort, false);
+
+    pThis->IConnector.pbData     = NULL;
+    pThis->IConnector.cbScanline = 0;
+    pThis->IConnector.cBits      = 32;
+    pThis->IConnector.cx         = 0;
+    pThis->IConnector.cy         = 0;
+
+    if (pThis->pDisplay)
+    {
+        AutoWriteLock displayLock(pThis->pDisplay COMMA_LOCKVAL_SRC_POS);
+#ifdef VBOX_WITH_RECORDING
+        pThis->pDisplay->mParent->i_recordingStop();
+#endif
+#ifdef VBOX_WITH_CRHGSMI
+        pThis->pDisplay->i_destructCrHgsmiData();
+#endif
+#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI)
+        pThis->pVBVACallbacks = NULL;
+#endif
+
         pThis->pDisplay->mpDrv = NULL;
-    }
+        pThis->pDisplay = NULL;
+    }
+#if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_CRHGSMI)
+    pThis->pVBVACallbacks = NULL;
+#endif
 }
 
@@ -4657,5 +4708,5 @@
     NULL,
     /* pfnPowerOff */
-    NULL,
+    Display::i_drvPowerOff,
     /* pfnSoftReset */
     NULL,
