Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 81209)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 81210)
@@ -2562,4 +2562,5 @@
 {
     VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
+    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
     VBoxVHWASurfList *pList = pSurf->getComplexList();
     Assert(pSurf->handle() != VBOXVHWA_SURFHANDLE_INVALID);
@@ -2640,5 +2641,7 @@
 {
     VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
+    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
     VBOXQGLLOG_ENTER(("pSurf (0x%x)\n",pSurf));
+
     vboxCheckUpdateAddress (pSurf, pCmd->u.in.offSurface);
     if (pCmd->u.in.rectValid)
@@ -2653,4 +2656,5 @@
 {
     VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
+    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
 #ifdef DEBUG_misha
     /* for performance reasons we should receive unlock for visible surfaces only
@@ -2700,6 +2704,8 @@
 {
     VBoxVHWASurfaceBase *pTargSurf = handle2Surface(pCmd->u.in.hTargSurf);
+    AssertReturn(pTargSurf, VERR_INVALID_PARAMETER);
     VBoxVHWASurfaceBase *pCurrSurf = handle2Surface(pCmd->u.in.hCurrSurf);
-    VBOXQGLLOG_ENTER(("pTargSurf (0x%x), pCurrSurf (0x%x)\n",pTargSurf,pCurrSurf));
+    AssertReturn(pCurrSurf, VERR_INVALID_PARAMETER);
+    VBOXQGLLOG_ENTER(("pTargSurf (0x%x), pCurrSurf (0x%x)\n", pTargSurf, pCurrSurf));
     vboxCheckUpdateAddress (pCurrSurf, pCmd->u.in.offCurrSurface);
     vboxCheckUpdateAddress (pTargSurf, pCmd->u.in.offTargSurface);
@@ -2811,4 +2817,5 @@
 {
     VBoxVHWASurfaceBase *pSrcSurf = handle2Surface(pCmd->u.in.hSrcSurf);
+    AssertReturn(pSrcSurf, VERR_INVALID_PARAMETER);
     VBoxVHWASurfList *pList = pSrcSurf->getComplexList();
     vboxCheckUpdateAddress (pSrcSurf, pCmd->u.in.offSrcSurface);
@@ -2819,4 +2826,5 @@
     {
         pDstSurf = handle2Surface(pCmd->u.in.hDstSurf);
+        AssertReturn(pDstSurf, VERR_INVALID_PARAMETER);
         vboxCheckUpdateAddress (pDstSurf, pCmd->u.in.offDstSurface);
         VBOXQGLLOG(("pDstSurf (0x%x)\n",pDstSurf));
@@ -2845,4 +2853,5 @@
     if (pCmd->u.in.xFlags & VBOXVHWACMD_SURF_OVERLAY_UPDATE_F_DSTMEMRECT)
     {
+        AssertReturn(pDstSurf, VERR_INVALID_PARAMETER);
         QRect r = VBOXVHWA_CONSTRUCT_QRECT_FROM_RECTL_WH(&pCmd->u.in.xUpdatedDstMemRect);
         pDstSurf->updatedMem(&r);
@@ -2878,5 +2887,7 @@
 {
     VBoxVHWASurfaceBase *pDstSurf = handle2Surface(pCmd->u.in.hDstSurf);
+    AssertReturn(pDstSurf, VERR_INVALID_PARAMETER);
     VBoxVHWASurfaceBase *pSrcSurf = handle2Surface(pCmd->u.in.hSrcSurf);
+    AssertReturn(pSrcSurf, VERR_INVALID_PARAMETER);
 
     VBOXQGLLOG_ENTER(("pDstSurf (0x%x), pSrcSurf (0x%x)\n",pDstSurf,pSrcSurf));
@@ -2919,4 +2930,5 @@
 {
     VBoxVHWASurfaceBase *pSurf = handle2Surface(pCmd->u.in.hSurf);
+    AssertReturn(pSurf, VERR_INVALID_PARAMETER);
     VBOXQGLLOG_ENTER(("pSurf (0x%x)\n", pSurf));
 
