- ASSERT(us->LastDeadChild->Status == THREAD_STAT_ZOMBIE);
- us->LastDeadChild->Status = THREAD_STAT_DEAD;
+ if( dead_thread->Status != THREAD_STAT_ZOMBIE ) {
+ Log_Error("Thread", "Thread %p(%i %s) is not ZOMBIE, instead %s",
+ dead_thread, dead_thread->TID, dead_thread->ThreadName,
+ (dead_thread->Status < ciTHREAD_STAT_COUNT ? casTHREAD_STAT[dead_thread->Status] : "?")
+ );
+ ASSERTC(dead_thread->Status, ==, THREAD_STAT_ZOMBIE);
+ }
+ dead_thread->Status = THREAD_STAT_DEAD;