VirtualBox

Changeset 55940 in vbox


Ignore:
Timestamp:
May 19, 2015 6:59:30 PM (9 years ago)
Author:
vboxsync
Message:

Frontends/VBoxManage: make sure we don't crash when there's no VM process (and thus no console) for the named machine with controlvm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp

    r55923 r55940  
    110110        /* ... and session machine */
    111111        CHECK_ERROR_BREAK(a->session, COMGETTER(Machine)(sessionMachine.asOutParam()));
     112
     113        if (!console)
     114        {
     115            errorArgument("Machine '%s' is not currently running", a->argv[0]);
     116            return 1;
     117        }
    112118
    113119        /* which command? */
     
    13951401        }
    13961402#ifdef VBOX_WITH_VPX
    1397         /* 
    1398          * Note: Commands starting with "vcp" are the deprecated versions and are 
    1399          *       kept to ensure backwards compatibility. 
     1403        /*
     1404         * Note: Commands starting with "vcp" are the deprecated versions and are
     1405         *       kept to ensure backwards compatibility.
    14001406         */
    14011407        else if (   !strcmp(a->argv[1], "videocap")
     
    15641570                rc = E_FAIL;
    15651571                break;
    1566             }   
     1572            }
    15671573
    15681574            uint32_t uVal;
     
    15841590                rc = E_FAIL;
    15851591                break;
    1586             } 
     1592            }
    15871593
    15881594            uint32_t uVal;
     
    16041610                rc = E_FAIL;
    16051611                break;
    1606             }   
     1612            }
    16071613
    16081614            uint32_t uVal;
     
    16241630                rc = E_FAIL;
    16251631                break;
    1626             }   
     1632            }
    16271633
    16281634            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureOptions)(Bstr(a->argv[3]).raw()));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette