]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/beacon.cxx
Land the GPS/route-manager re-write. Many things are better, many other things will...
[flightgear.git] / src / Sound / beacon.cxx
index 1f9d6b30612fedf2a328a085a557cbdc18d0ef9a..41a99027190ee09cce0e51c6081979122715ed60 100644 (file)
@@ -24,6 +24,8 @@
 #include "beacon.hxx"
 
 #include <simgear/structure/exception.hxx>
+#include <Main/fg_props.hxx>
+#include <Main/globals.hxx>
 
 // constructor
 FGBeacon::FGBeacon()
@@ -41,6 +43,10 @@ bool FGBeacon::init() {
     int len;
     unsigned char *ptr;
 
+    if (globals->get_soundmgr()->is_working() == false) {
+       return false;
+    }
+
     unsigned char inner_buf[ INNER_SIZE ] ;
     unsigned char middle_buf[ MIDDLE_SIZE ] ;
     unsigned char outer_buf[ OUTER_SIZE ] ;