Temporary fix for crash in FGVoiceMgr on reset
This commit is contained in:
parent
cadb77b18d
commit
38e2b8b11c
1 changed files with 7 additions and 4 deletions
|
@ -117,10 +117,13 @@ void FGVoiceMgr::init()
|
||||||
void FGVoiceMgr::shutdown()
|
void FGVoiceMgr::shutdown()
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_THREADS)
|
#if defined(ENABLE_THREADS)
|
||||||
|
SG_LOG(SG_ALL,SG_ALERT,"FGVoiceMgr::shutdown");
|
||||||
|
if( _thread ) {
|
||||||
_thread->cancel();
|
_thread->cancel();
|
||||||
_thread->join();
|
_thread->join();
|
||||||
delete _thread;
|
delete _thread;
|
||||||
_thread = NULL;
|
_thread = NULL;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for( std::vector<FGVoice*>::iterator it = _voices.begin(); it != _voices.end(); ++it )
|
for( std::vector<FGVoice*>::iterator it = _voices.begin(); it != _voices.end(); ++it )
|
||||||
|
|
Loading…
Reference in a new issue