Index: /trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp	(revision 98726)
@@ -776,4 +776,13 @@
         QApplication::translate("UIMessageCenter", "Failed to acquire emulated USB parameter.") +
         UIErrorString::formatErrorInfo(comDispatcher));
+}
+
+/* static */
+void UINotificationMessage::cannotAcquireVRDEServerParameter(const CVRDEServer &comServer)
+{
+    createMessage(
+        QApplication::translate("UIMessageCenter", "VRDE server failure ..."),
+        QApplication::translate("UIMessageCenter", "Failed to acquire VRDE server parameter.") +
+        UIErrorString::formatErrorInfo(comServer));
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h	(revision 98726)
@@ -332,4 +332,7 @@
           * @param  comDispatcher  Brings the object parameter get acquired from. */
         static void cannotAcquireEmulatedUSBParameter(const CEmulatedUSB &comDispatcher);
+        /** Notifies about inability to acquire IVRDEServer parameter.
+          * @param  comServer  Brings the object parameter get acquired from. */
+        static void cannotAcquireVRDEServerParameter(const CVRDEServer &comServer);
         /** Notifies about inability to acquire IVirtualSystemDescription parameter.
           * @param  comVsd  Brings the object parameter get acquired from. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 98726)
@@ -281,11 +281,14 @@
 {
     /* Make sure VRDE server present: */
-    const CVRDEServer comServer = uisession()->machine().GetVRDEServer();
-    AssertMsgReturnVoid(uisession()->machine().isOk() && comServer.isNotNull(),
+    bool fServerPresent = false;
+    acquireWhetherVRDEServerPresent(fServerPresent);
+    AssertMsgReturnVoid(fServerPresent,
                         ("VRDE server can't be null!\n"));
 
     /* Check/Uncheck VRDE Server action depending on feature status: */
+    bool fServerEnabled = false;
+    acquireWhetherVRDEServerEnabled(fServerEnabled);
     actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->blockSignals(true);
-    actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->setChecked(comServer.GetEnabled());
+    actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->setChecked(fServerEnabled);
     actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)->blockSignals(false);
 }
@@ -562,4 +565,19 @@
 {
     return uisession()->invalidateAndUpdateScreen(uScreenId);
+}
+
+bool UIMachine::acquireWhetherVRDEServerPresent(bool &fPresent)
+{
+    return uisession()->acquireWhetherVRDEServerPresent(fPresent);
+}
+
+bool UIMachine::acquireWhetherVRDEServerEnabled(bool &fEnabled)
+{
+    return uisession()->acquireWhetherVRDEServerEnabled(fEnabled);
+}
+
+bool UIMachine::setVRDEServerEnabled(bool fEnabled)
+{
+    return uisession()->setVRDEServerEnabled(fEnabled);
 }
 
@@ -1597,6 +1615,7 @@
     {
         /* Initialize 'View' menu: */
-        const CVRDEServer comServer = uisession()->machine().GetVRDEServer();
-        if (comServer.isNull())
+        bool fServerPresent = false;
+        acquireWhetherVRDEServerPresent(fServerPresent);
+        if (!fServerPresent)
             restrictionForView = (UIExtraDataMetaDefs::RuntimeMenuViewActionType)
                                  (restrictionForView | UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 98726)
@@ -342,4 +342,11 @@
         /** Notifies display about screen with passed uScreenId was invalidated. */
         bool invalidateAndUpdateScreen(ulong uScreenId);
+
+        /** Acquires whether VRDE server is present. */
+        bool acquireWhetherVRDEServerPresent(bool &fPresent);
+        /** Acquires whether VRDE server is enabled. */
+        bool acquireWhetherVRDEServerEnabled(bool &fEnabled);
+        /** Defines whether VRDE server is enabled. */
+        bool setVRDEServerEnabled(bool fEnabled);
     /** @} */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 98726)
@@ -1991,25 +1991,20 @@
         return;
 
-    /* Access VRDE server: */
-    CVRDEServer server = machine().GetVRDEServer();
-    AssertMsgReturnVoid(machine().isOk() && !server.isNull(),
+    /* Make sure VRDE server present: */
+    bool fServerPresent = false;
+    uimachine()->acquireWhetherVRDEServerPresent(fServerPresent);
+    AssertMsgReturnVoid(fServerPresent,
                         ("VRDE server should NOT be null!\n"));
 
     /* Make sure something had changed: */
-    if (server.GetEnabled() == static_cast<BOOL>(fEnabled))
-        return;
-
-    /* Update VRDE server state: */
-    server.SetEnabled(fEnabled);
-    if (!server.isOk())
-    {
-        /* Make sure action is updated: */
-        uimachine()->updateStateVRDEServerAction();
-        /* Notify about the error: */
-        return UINotificationMessage::cannotToggleVRDEServer(server, machineName(), fEnabled);
-    }
-
-    /* Save machine-settings, make sure action is updated in case of failure: */
-    if (!uimachine()->saveSettings())
+    bool fServerEnabled = false;
+    uimachine()->acquireWhetherVRDEServerEnabled(fServerEnabled);
+    if (fServerEnabled == fEnabled)
+        return;
+
+    /* Update and save VRDE server state,
+     * make sure action is updated in case of failure: */
+    if (   !uimachine()->setVRDEServerEnabled(fEnabled)
+        || !uimachine()->saveSettings())
         return uimachine()->updateStateVRDEServerAction();
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 98726)
@@ -71,4 +71,5 @@
 #include "CUSBDeviceFilter.h"
 #include "CUSBDeviceFilters.h"
+#include "CVRDEServer.h"
 #ifdef VBOX_WITH_NETFLT
 # include "CNetworkAdapter.h"
@@ -980,4 +981,48 @@
 }
 
+bool UISession::acquireWhetherVRDEServerPresent(bool &fPresent)
+{
+    CMachine comMachine = machine();
+    CVRDEServer comServer = comMachine.GetVRDEServer();
+    fPresent = comMachine.isOk() && comServer.isNotNull();
+    return true;
+}
+
+bool UISession::acquireWhetherVRDEServerEnabled(bool &fEnabled)
+{
+    CMachine comMachine = machine();
+    CVRDEServer comServer = comMachine.GetVRDEServer();
+    bool fSuccess = comMachine.isOk();
+    if (!fSuccess)
+        UINotificationMessage::cannotAcquireMachineParameter(comMachine);
+    else
+    {
+        const BOOL fServerEnabled = comServer.GetEnabled();
+        fSuccess = comServer.isOk();
+        if (!fSuccess)
+            UINotificationMessage::cannotAcquireVRDEServerParameter(comServer);
+        else
+            fEnabled = fServerEnabled == TRUE;
+    }
+    return fSuccess;
+}
+
+bool UISession::setVRDEServerEnabled(bool fEnabled)
+{
+    CMachine comMachine = machine();
+    CVRDEServer comServer = comMachine.GetVRDEServer();
+    bool fSuccess = comMachine.isOk();
+    if (!fSuccess)
+        UINotificationMessage::cannotAcquireMachineParameter(comMachine);
+    else
+    {
+        comServer.SetEnabled(fEnabled);
+        fSuccess = comServer.isOk();
+        if (!fSuccess)
+            UINotificationMessage::cannotToggleVRDEServer(comServer, machineName(), fEnabled);
+    }
+    return fSuccess;
+}
+
 bool UISession::acquireDeviceActivity(const QVector<KDeviceType> &deviceTypes, QVector<KDeviceActivity> &states)
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 98725)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 98726)
@@ -394,4 +394,11 @@
         /** Notifies display about screen with passed uScreenId was invalidated. */
         bool invalidateAndUpdateScreen(ulong uScreenId);
+
+        /** Acquires whether VRDE server is present. */
+        bool acquireWhetherVRDEServerPresent(bool &fPresent);
+        /** Acquires whether VRDE server is enabled. */
+        bool acquireWhetherVRDEServerEnabled(bool &fEnabled);
+        /** Defines whether VRDE server is enabled. */
+        bool setVRDEServerEnabled(bool fEnabled);
     /** @} */
 
