]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/atis.cxx
#591: night-time rendering issues, avoid negative color values
[flightgear.git] / src / ATCDCL / atis.cxx
index dad36fb0a8c351aa2a1584e5847d2e44ba403659..b87369e1a01b7c41c6a91c96cc9a89d801e34ff0 100644 (file)
@@ -76,7 +76,14 @@ FGATIS::FGATIS() :
   _prev_display(0),
   refname("atis")
 {
-  _vPtr = globals->get_ATC_mgr()->GetVoicePointer(ATIS);
+  FGATCMgr* pAtcMgr = globals->get_ATC_mgr();
+  if (!pAtcMgr)
+  {
+      SG_LOG(SG_ATC, SG_ALERT, "ERROR! No ATC manager! Oops...");
+      _vPtr = NULL;
+  }
+  else
+      _vPtr = pAtcMgr->GetVoicePointer(ATIS);
   _voiceOK = (_vPtr == NULL ? false : true);
   if (!(_type != ATIS || _type == AWOS)) {
        SG_LOG(SG_ATC, SG_ALERT, "ERROR - _type not ATIS or AWOS in atis.cxx");