VirtualBox

Changeset 41015 in vbox


Ignore:
Timestamp:
Apr 20, 2012 9:13:11 PM (13 years ago)
Author:
vboxsync
Message:

VBoxCOM: proper uninitialization even if com::Initialize failed very early

File:
1 edited

Legend:

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

    r38754 r41015  
    238238int EventQueue::uninit()
    239239{
    240     Assert(sMainQueue);
    241     /* Must process all events to make sure that no NULL event is left
    242      * after this point. It would need to modify the state of sMainQueue. */
     240    if (sMainQueue)
     241    {
     242        /* Must process all events to make sure that no NULL event is left
     243         * after this point. It would need to modify the state of sMainQueue. */
    243244#ifdef RT_OS_DARWIN /* Do not process the native runloop, the toolkit may not be ready for it. */
    244     sMainQueue->mEventQ->ProcessPendingEvents();
     245        sMainQueue->mEventQ->ProcessPendingEvents();
    245246#else
    246     sMainQueue->processEventQueue(0);
     247        sMainQueue->processEventQueue(0);
    247248#endif
    248     delete sMainQueue;
    249     sMainQueue = NULL;
     249        delete sMainQueue;
     250        sMainQueue = NULL;
     251    }
    250252    return VINF_SUCCESS;
    251253}
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