kDurationForever);
if ( err)
{
- wxLogSysError( _( "Cannot wait on thread to exit."));
+ wxLogSysError( _( "Cannot wait for thread termination."));
rc = (void*) -1;
}
verify_noerr( MPAllocateTaskStorageIndex( &gs_tlsForWXThread ) ) ;
// main thread's This() is NULL
- verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , NULL ) ) ;
+ verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , 0 ) ) ;
gs_idMainThread = wxThread::GetCurrentId() ;
wxASSERT_MSG( wxThread::IsMain(),
wxT("only main thread may call wxMutexGuiLeaveOrEnter()!") );
+ if( !gs_critsectWaitingForGui )
+ return;
+
wxCriticalSectionLocker enter(*gs_critsectWaitingForGui);
if ( gs_nWaitingForGui == 0 )