1
0
Fork 0

Temporary fix for crash in FGVoiceMgr on reset

This commit is contained in:
Torsten Dreyer 2014-04-27 21:38:24 +02:00
parent cadb77b18d
commit 38e2b8b11c

View file

@ -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 )