Index: /trunk/src/VBox/Main/GuestImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/GuestImpl.cpp	(revision 29996)
+++ /trunk/src/VBox/Main/GuestImpl.cpp	(revision 29997)
@@ -269,7 +269,11 @@
         mMemoryBalloonSize = aMemoryBalloonSize;
         /* forward the information to the VMM device */
-        VMMDev *vmmDev = mParent->getVMMDev();
-        if (vmmDev)
-            vmmDev->getVMMDevPort()->pfnSetMemoryBalloon(vmmDev->getVMMDevPort(), aMemoryBalloonSize);
+        VMMDev *pVMMDev = mParent->getVMMDev();
+        if (pVMMDev)
+        {
+            PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort();
+            ComAssertRet(pVMMDevPort, E_FAIL);
+            pVMMDevPort->pfnSetMemoryBalloon(pVMMDevPort, aMemoryBalloonSize);
+        }
     }
 
@@ -299,7 +303,11 @@
     mStatUpdateInterval = aUpdateInterval;
     /* forward the information to the VMM device */
-    VMMDev *vmmDev = mParent->getVMMDev();
-    if (vmmDev)
-        vmmDev->getVMMDevPort()->pfnSetStatisticsInterval(vmmDev->getVMMDevPort(), aUpdateInterval);
+    VMMDev *pVMMDev = mParent->getVMMDev();
+    if (pVMMDev)
+    {
+        PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort();
+        ComAssertRet(pVMMDevPort, E_FAIL);
+        pVMMDevPort->pfnSetStatisticsInterval(pVMMDevPort, aUpdateInterval);
+    }
 
     return S_OK;
@@ -393,12 +401,15 @@
 
     /* forward the information to the VMM device */
-    VMMDev *vmmDev = mParent->getVMMDev();
-    if (vmmDev)
-    {
+    VMMDev *pVMMDev = mParent->getVMMDev();
+    if (pVMMDev)
+    {
+        PPDMIVMMDEVPORT pVMMDevPort = pVMMDev->getVMMDevPort();
+        ComAssertRet(pVMMDevPort, E_FAIL);
+
         uint32_t u32Flags = VMMDEV_SETCREDENTIALS_GUESTLOGON;
         if (!aAllowInteractiveLogon)
             u32Flags = VMMDEV_SETCREDENTIALS_NOLOCALLOGON;
 
-        vmmDev->getVMMDevPort()->pfnSetCredentials(vmmDev->getVMMDevPort(),
+        pVMMDevPort->pfnSetCredentials(pVMMDevPort,
             Utf8Str(aUserName).raw(), Utf8Str(aPassword).raw(),
             Utf8Str(aDomain).raw(), u32Flags);
