]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/morse.cxx
Fix MSVC compilation
[flightgear.git] / src / Sound / morse.cxx
index 674fa991a0804769957b474121588c72f9b8bfcd..754c98eb3be201903ebe809160cf1f65277a238b 100644 (file)
@@ -23,6 +23,9 @@
 
 #include <simgear/constants.h>
 
+#include <Main/fg_props.hxx>
+#include <Main/globals.hxx>
+
 #include "morse.hxx"
 
 
@@ -167,6 +170,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;