Don't try to close & delete a NULL thread

This commit is contained in:
baldurk
2016-10-03 15:39:41 +02:00
parent df77ef6cbe
commit 9489e4e4d1
+5
View File
@@ -62,12 +62,17 @@ void RenderManager::CloseThread()
m_RenderCondition.wakeAll();
if(m_Thread == NULL)
return;
// wait for the thread to close and clean up
while(m_Thread->isRunning())
{
}
m_Thread->deleteLater();
m_Thread = NULL;
}
void RenderManager::PushInvoke(RenderManager::InvokeHandle *cmd)