Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 55939)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 55940)
@@ -110,4 +110,10 @@
         /* ... and session machine */
         CHECK_ERROR_BREAK(a->session, COMGETTER(Machine)(sessionMachine.asOutParam()));
+
+        if (!console)
+        {
+            errorArgument("Machine '%s' is not currently running", a->argv[0]);
+            return 1;
+        }
 
         /* which command? */
@@ -1395,7 +1401,7 @@
         }
 #ifdef VBOX_WITH_VPX
-        /* 
-         * Note: Commands starting with "vcp" are the deprecated versions and are 
-         *       kept to ensure backwards compatibility. 
+        /*
+         * Note: Commands starting with "vcp" are the deprecated versions and are
+         *       kept to ensure backwards compatibility.
          */
         else if (   !strcmp(a->argv[1], "videocap")
@@ -1564,5 +1570,5 @@
                 rc = E_FAIL;
                 break;
-            }   
+            }
 
             uint32_t uVal;
@@ -1584,5 +1590,5 @@
                 rc = E_FAIL;
                 break;
-            } 
+            }
 
             uint32_t uVal;
@@ -1604,5 +1610,5 @@
                 rc = E_FAIL;
                 break;
-            }   
+            }
 
             uint32_t uVal;
@@ -1624,5 +1630,5 @@
                 rc = E_FAIL;
                 break;
-            }   
+            }
 
             CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureOptions)(Bstr(a->argv[3]).raw()));
