Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 71651)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 71652)
@@ -3407,6 +3407,7 @@
     const SurfList & primaryList = mDisplay.primaries().surfaces();
     uint32_t cPrimary = (uint32_t)primaryList.size();
-    if (cPrimary &&
-            (mDisplay.getVGA() == NULL || mDisplay.getVGA()->handle() == VBOXVHWA_SURFHANDLE_INVALID))
+    if (   cPrimary
+        && (   mDisplay.getVGA() == NULL
+            || mDisplay.getVGA()->handle() == VBOXVHWA_SURFHANDLE_INVALID))
     {
         cPrimary -= 1;
@@ -3414,4 +3415,5 @@
 
     int rc = SSMR3PutU32(pSSM, cPrimary);
+    AssertRCReturnVoid(rc);
     if (cPrimary)
     {
