]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/mk_viii.cxx
- fix unzoomed tapes (TODO: restore tick length)
[flightgear.git] / src / Instrumentation / mk_viii.cxx
index 4a68c41abcb9413743353115c5cc16b265444113..118d740b70e64584758f257e336d4d9fa9e6bfe4 100755 (executable)
@@ -76,7 +76,9 @@ SG_USING_STD(string);
 
 #include "Airports/runways.hxx"
 #include "Airports/simple.hxx"
-#include "Include/version.h"
+#ifndef _MSC_VER
+#  include "Include/version.h"
+#endif
 #include "Main/fg_props.hxx"
 #include "Main/globals.hxx"
 #include "instrument_mgr.hxx"
@@ -233,7 +235,7 @@ MK_VIII::PropertiesHandler::init ()
 void
 MK_VIII::PropertiesHandler::unbind ()
 {
-  vector<SGPropertyNode *>::iterator iter;
+  vector<SGPropertyNode_ptr>::iterator iter;
 
   for (iter = tied_properties.begin(); iter != tied_properties.end(); iter++)
     (*iter)->untie();
@@ -2297,7 +2299,13 @@ MK_VIII::VoicePlayer::get_sample (const char *name)
   std::ostringstream refname;
   refname << mk->name << "[" << mk->num << "]" << "/" << name;
 
-  SGSoundSample *sample = globals->get_soundmgr()->find(refname.str());
+  SGSoundMgr *soundmgr = globals->get_soundmgr();
+  if (soundmgr->is_working() == false)
+    {
+      return NULL;
+    }
+
+  SGSoundSample *sample = soundmgr->find(refname.str());
   if (! sample)
     {
       SGPath sample_path(globals->get_fg_root());
@@ -2314,7 +2322,7 @@ MK_VIII::VoicePlayer::get_sample (const char *name)
          exit(1);
        }
 
-      globals->get_soundmgr()->add(sample, refname.str());
+      soundmgr->add(sample, refname.str());
       samples[refname.str()] = sample;
     }