CModel3::StopThreads() now makes sures threads are paused before deleting thread objects.

This commit is contained in:
Nik Henson 2011-09-18 22:49:21 +00:00
parent 5a0f038171
commit f695ff7094

View file

@ -2055,10 +2055,13 @@ void CModel3::StopThreads(void)
if (!startedThreads) if (!startedThreads)
return; return;
// Remove callback // If sound board not sync'd then remove callback
if (!syncSndBrdThread) if (!syncSndBrdThread)
SetAudioCallback(NULL, NULL); SetAudioCallback(NULL, NULL);
// Pause threads so that can safely delete thread objects
PauseThreads();
DeleteThreadObjects(); DeleteThreadObjects();
startedThreads = false; startedThreads = false;
} }