~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/Main/glue/EventQueue.cpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-05-29 10:09:31 UTC
  • mfrom: (3.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120529100931-2xayrbh5hyzm6e9p
Tags: 4.1.16-dfsg-1
* New upstream release.
* Drop 37-fix-build-gcc47.patch, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
/* static */
238
238
int EventQueue::uninit()
239
239
{
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. */
243
244
#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();
245
246
#else
246
 
    sMainQueue->processEventQueue(0);
 
247
        sMainQueue->processEventQueue(0);
247
248
#endif
248
 
    delete sMainQueue;
249
 
    sMainQueue = NULL;
 
249
        delete sMainQueue;
 
250
        sMainQueue = NULL;
 
251
    }
250
252
    return VINF_SUCCESS;
251
253
}
252
254