Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 64753)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 64754)
@@ -118,11 +118,14 @@
 {
     /* Make sure machine is created: */
-    AssertPtrReturnVoid(m_spInstance);
-
+    if (!m_spInstance)
+        return;
+
+    /* Protect versus recursive call: */
+    UIMachine *pInstance = m_spInstance;
+    m_spInstance = 0;
     /* Cleanup machine UI: */
-    m_spInstance->cleanup();
+    pInstance->cleanup();
     /* Destroy machine UI: */
-    delete m_spInstance;
-    m_spInstance = 0;
+    delete pInstance;
 }
 
