mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
CModel3::StopThreads() now makes sures threads are paused before deleting thread objects.
This commit is contained in:
parent
5a0f038171
commit
f695ff7094
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue