]> git.mxchange.org Git - flightgear.git/commitdiff
Pigeons remaining 'crash on no sound device' fix.
authorfrohlich <frohlich>
Tue, 25 Apr 2006 18:48:59 +0000 (18:48 +0000)
committerfrohlich <frohlich>
Tue, 25 Apr 2006 18:48:59 +0000 (18:48 +0000)
src/Sound/fg_fx.cxx

index b04d9a46fc14ef90018b77778144bbebe2b29686..a7605934997b1612069d7c30da3215c051081773 100644 (file)
@@ -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 );