VirtualBox

Changeset 47800 in vbox for trunk/src


Ignore:
Timestamp:
Aug 16, 2013 11:15:56 AM (11 years ago)
Author:
vboxsync
Message:

Main/glue: fix error checking so that a missing components subdirectory (or one in an unexpected place) does not cause crashes due to NULL object reference use

Location:
trunk/src/VBox/Main/glue
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/NativeEventQueue.cpp

    r46651 r47800  
    224224        nsCOMPtr<nsIEventQueue> q;
    225225        nsresult rv = NS_GetMainEventQ(getter_AddRefs(q));
    226         Assert(NS_SUCCEEDED(rv));
     226        AssertComRCReturnRC(rv);
    227227        Assert(q == sMainQueue->mEventQ);
    228228
  • trunk/src/VBox/Main/glue/initterm.cpp

    r47777 r47800  
    495495
    496496        /* clean up before the new try */
    497         rc = NS_ShutdownXPCOM(nsnull);
     497        HRESULT rc2 = NS_ShutdownXPCOM(nsnull);
     498        if (SUCCEEDED(rc))
     499            rc = rc2;
    498500
    499501        if (i == 0)
     
    505507
    506508#endif /* !defined (VBOX_WITH_XPCOM) */
     509
     510    AssertComRCReturnRC(rc);
    507511
    508512    // for both COM and XPCOM, we only get here if this is the main thread;
     
    510514    Assert(RTThreadIsMain(RTThreadSelf()));
    511515    util::InitAutoLockSystem();
    512 
    513     AssertComRC(rc);
    514516
    515517    /*
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