fixed Mac server keeps crashing during launch

This commit is contained in:
jerry 2013-09-25 10:44:09 +00:00
parent 4816a30db3
commit 95ece5ac2c
1 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,9 @@ class CEventQueueTimer { };
//
COSXEventQueueBuffer::COSXEventQueueBuffer(IEventQueue* events) :
m_eventQueue(events), m_event(NULL)
m_eventQueue(events),
m_event(NULL),
m_threadEventQueueRef(NULL)
{
// do nothing
}
@ -98,7 +100,7 @@ COSXEventQueueBuffer::addEvent(UInt32 dataID)
kEventAttributeNone,
&event);
if (error == noErr) {
if (error == noErr & m_threadEventQueueRef != NULL) {
error = PostEventToQueue(m_threadEventQueueRef, event,
kEventPriorityStandard);
ReleaseEvent(event);