Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp	(revision 55830)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp	(revision 55831)
@@ -1182,4 +1182,10 @@
 int CrFbEntryCreateForTexData(CR_FRAMEBUFFER *pFb, struct CR_TEXDATA *pTex, uint32_t fFlags, HCR_FRAMEBUFFER_ENTRY *phEntry)
 {
+    if (pTex == NULL)
+    {
+        WARN(("pTex is NULL"));
+        return VERR_INVALID_PARAMETER;
+    }
+
     RTRECT Rect;
     Rect.xLeft = 0;
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp	(revision 55830)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp	(revision 55831)
@@ -126,8 +126,15 @@
         }
 
-        for (j = 0; j < mural->cBuffers; ++j)
-        {
-            CrTdRelease(pData->apTexDatas[j]);
-            pData->apTexDatas[j] = NULL;
+        /* Release all valid texture data structures in the array.
+         * Do not rely on mural->cBuffers because it might be already
+         * set to zero in crServerDeleteMuralFBO.
+         */
+        for (j = 0; j < RT_ELEMENTS(pData->apTexDatas); ++j)
+        {
+            if (pData->apTexDatas[j] != NULL)
+            {
+                CrTdRelease(pData->apTexDatas[j]);
+                pData->apTexDatas[j] = NULL;
+            }
         }
 
@@ -203,4 +210,5 @@
         pData->hFb = hFb;
 
+        RT_ZERO(pData->apTexDatas);
         for (uint32_t i = 0; i < mural->cBuffers; ++i)
         {
