diff --git a/mozilla/xpcom/src/nsEventQueueService.cpp b/mozilla/xpcom/src/nsEventQueueService.cpp index 63c40524f28..9d16815fcff 100644 --- a/mozilla/xpcom/src/nsEventQueueService.cpp +++ b/mozilla/xpcom/src/nsEventQueueService.cpp @@ -78,8 +78,10 @@ EventQueueStack::EventQueueStack(EventQueueStack* next) mEventQueue = NULL; } - if (NS_FAILED(mEventQueue->Init())) - mEventQueue = NULL; + if (mEventQueue) { + if (NS_FAILED(mEventQueue->Init())) + mEventQueue = NULL; + } } EventQueueStack::~EventQueueStack() diff --git a/mozilla/xpcom/threads/nsEventQueueService.cpp b/mozilla/xpcom/threads/nsEventQueueService.cpp index 63c40524f28..9d16815fcff 100644 --- a/mozilla/xpcom/threads/nsEventQueueService.cpp +++ b/mozilla/xpcom/threads/nsEventQueueService.cpp @@ -78,8 +78,10 @@ EventQueueStack::EventQueueStack(EventQueueStack* next) mEventQueue = NULL; } - if (NS_FAILED(mEventQueue->Init())) - mEventQueue = NULL; + if (mEventQueue) { + if (NS_FAILED(mEventQueue->Init())) + mEventQueue = NULL; + } } EventQueueStack::~EventQueueStack()