CThread(void) :
m_bStop(false),
m_bRunning(false),
- m_bStopped(false) {}
+ m_bStopped(false),
+ m_thread(NULL) {}
virtual ~CThread(void)
{
StopThread(0);
void *retVal = NULL;
- ThreadsWait(m_thread, &retVal);
- #if defined(__WINDOWS__)
- (void *)retVal; //"unreferenced local variable" warning
- #endif
+ if (m_thread)
+ ThreadsWait(m_thread, &retVal);
}
static void *ThreadHandler(CThread *thread)