]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/morse.cxx
Fix compilation - missing include of globals.hxx
[flightgear.git] / src / Sound / morse.cxx
index 674fa991a0804769957b474121588c72f9b8bfcd..2d21be642a77e513b51e0e57dfa3325567ec6d2a 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <simgear/constants.h>
 
+#include <Main/globals.hxx>
+
 #include "morse.hxx"
 
 
@@ -167,6 +169,11 @@ bool FGMorse::cust_init(const int freq ) {
 
 // make a SGSoundSample morse code transmission for the specified string
 SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
+
+    if (globals->get_soundmgr()->is_working() == false) {
+       return 0;
+    }
+
     char *idptr = (char *)id.c_str();
 
     int length = 0;