VirtualBox

Changeset 24088 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 26, 2009 4:08:22 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53965
Message:

Main/Console: better fail than return NULL machine reference, which will usually lead to client crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r23880 r24088  
    13151315    /* mMachine is constant during life time, no need to lock */
    13161316    mMachine.queryInterfaceTo(aMachine);
     1317
     1318    /* callers expect to get a valid reference, better fail than crash them */
     1319    if (mMachine.isNull())
     1320        return E_FAIL;
    13171321
    13181322    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.

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