Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp	(revision 54102)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp	(revision 54103)
@@ -56,6 +56,5 @@
 
 UIFrameBuffer::UIFrameBuffer()
-    : m_visualState(UIVisualStateType_Invalid)
-    , m_iWidth(0), m_iHeight(0)
+    : m_iWidth(0), m_iHeight(0)
     , m_pMachineView(NULL)
     , m_iWinId(0)
@@ -76,7 +75,4 @@
     LogRel2(("UIFrameBuffer::init %p\n", this));
 
-    /* Fetch visual-state: */
-    m_visualState = pMachineView->visualStateType();
-
     /* Assign mahine-view: */
     m_pMachineView = pMachineView;
@@ -150,4 +146,9 @@
     m_fUnused = fUnused;
     unlock();
+}
+
+UIVisualStateType UIFrameBuffer::visualState() const
+{
+    return m_pMachineView ? m_pMachineView->visualStateType() : UIVisualStateType_Invalid;
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 54102)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 54103)
@@ -77,6 +77,6 @@
     void setMarkAsUnused(bool fUnused);
 
-    /** Returns the visual-state this frame-buffer created for. */
-    UIVisualStateType visualState() const { return m_visualState; }
+    /** Returns the visual-state this frame-buffer is used for. */
+    UIVisualStateType visualState() const;
 
     /** Returns whether frame-buffer is <b>auto-enabled</b>.
@@ -264,7 +264,4 @@
                               HiDPIOptimizationType hiDPIOptimizationType,
                               double dBackingScaleFactor);
-
-    /** Holds the visual-state this frame-buffer created for. */
-    UIVisualStateType m_visualState;
 
     /** Holds the QImage buffer. */
