Match MxEventManager::Create

This commit is contained in:
Christian Semmler 2023-10-14 17:03:17 -04:00
parent 689bc32a03
commit a52763c84a

View File

@ -49,17 +49,16 @@ MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
locked = TRUE; locked = TRUE;
this->m_thread = new MxTickleThread(this, p_frequencyMS); this->m_thread = new MxTickleThread(this, p_frequencyMS);
if (this->m_thread) { if (!this->m_thread || this->m_thread->Start(0, 0) != SUCCESS)
if (this->m_thread->Start(0, 0) == SUCCESS) goto done;
status = SUCCESS;
}
} }
else { else
TickleManager()->RegisterClient(this, p_frequencyMS); TickleManager()->RegisterClient(this, p_frequencyMS);
status = SUCCESS;
} status = SUCCESS;
} }
done:
if (status != SUCCESS) if (status != SUCCESS)
Destroy(); Destroy();