]> git.mxchange.org Git - flightgear.git/commitdiff
Vivian MEAZZA: check for carrier name and aircraft callsign without
authormfranz <mfranz>
Mon, 15 May 2006 10:47:32 +0000 (10:47 +0000)
committermfranz <mfranz>
Mon, 15 May 2006 10:47:32 +0000 (10:47 +0000)
               creating them

src/Instrumentation/tacan.cxx

index 3b1accba8e1667f4a6681e9586d1e9655cfed57c..81627abff212693f157632ca9066b4af800ad64b 100755 (executable)
@@ -129,10 +129,14 @@ TACAN::init ()
     _y_shift_node = dnode->getChild("y-shift", 0, true);
     _rotation_node = dnode->getChild("rotation", 0, true);
     _channel_node = dnode->getChild("channel", 0, true);
-    SGPropertyNode *cnode = fgGetNode("/ai/models/carrier", num, true );
-    _carrier_name_node = cnode->getChild("name", 0, true);
-    SGPropertyNode *tnode = fgGetNode("/ai/models/aircraft", num, true );
-    _tanker_callsign_node = tnode->getChild("callsign", 0, true);
+
+    SGPropertyNode *cnode = fgGetNode("/ai/models/carrier", num, false );
+    if (cnode)
+        _carrier_name_node = cnode->getChild("name", 0, false);
+
+    SGPropertyNode *tnode = fgGetNode("/ai/models/aircraft", num, false);
+    if (tnode)
+        _tanker_callsign_node = tnode->getChild("callsign", 0, false);
 }
 
 void