Skip to content

Commit

Permalink
Fixed|liblegacy: Potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Dec 31, 2015
1 parent a443701 commit 5237fcd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/sdk/liblegacy/src/concurrency.cpp
Expand Up @@ -161,6 +161,12 @@ void Thread_SetCallback(thread_t thread, void (*terminationFunc)(systhreadexitst

int Sys_WaitThread(thread_t handle, int timeoutMs, systhreadexitstatus_t *exitStatus)
{
if(!handle)
{
if(exitStatus) *exitStatus = DENG_THREAD_STOPPED_NORMALLY;
return 0;
}

CallbackThread *t = reinterpret_cast<CallbackThread *>(handle);
assert(static_cast<QThread *>(t) != QThread::currentThread());
t->wait(timeoutMs);
Expand Down

0 comments on commit 5237fcd

Please sign in to comment.