From 573fb5a50ad1432516ab1ce49da96c6819c65e1f Mon Sep 17 00:00:00 2001 From: frohlich Date: Tue, 25 Apr 2006 18:48:59 +0000 Subject: [PATCH] Pigeons remaining 'crash on no sound device' fix. --- src/Sound/fg_fx.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index b04d9a46f..a76059349 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -129,6 +129,10 @@ FGFX::update (double dt) { SGSoundMgr *smgr = globals->get_soundmgr(); + if (smgr->is_working() == false) { + return; + } + // command sound manger bool pause = _pause->getBoolValue(); if ( pause != last_pause ) { @@ -189,6 +193,9 @@ FGFX::play_message( SGSoundSample *_sample ) void FGFX::play_message( const string path, const string fname ) { + if (globals->get_soundmgr()->is_working() == false) { + return; + } SGSoundSample *sample; sample = new SGSoundSample( path.c_str(), fname.c_str() ); play_message( sample ); -- 2.39.5