]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/atcdialog.cxx
Tolerate the lack of a GUI in some places.
[flightgear.git] / src / ATC / atcdialog.cxx
index bb5e31e6904b5f2a25809e4ace5ae827f289f01e..ba7bc1791382e535b480b2356194de6065fc33d3 100644 (file)
@@ -44,8 +44,7 @@
 #include <Airports/simple.hxx>
 #include <ATC/CommStation.hxx>
 
-
-FGATCDialogNew *currentATCDialog;
+using std::string;
 
 static SGPropertyNode *getNamedNode(SGPropertyNode *prop, const char *name)
 {
@@ -249,6 +248,10 @@ void FGATCDialogNew::update(double dt) {
 
     const char *dialog_name = "atc-dialog";
     _gui = (NewGUI *)globals->get_subsystem("gui");
+    if (!_gui) {
+      return;
+    }
+  
     SGPropertyNode_ptr dlg = _gui->getDialogProperties(dialog_name);
     if (!dlg)
         return;