From 95b6f8057aeae4276da69a42ab7204eb39393b1e Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 15 May 2006 10:47:32 +0000 Subject: [PATCH] Vivian MEAZZA: check for carrier name and aircraft callsign without creating them --- src/Instrumentation/tacan.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Instrumentation/tacan.cxx b/src/Instrumentation/tacan.cxx index 3b1accba8..81627abff 100755 --- a/src/Instrumentation/tacan.cxx +++ b/src/Instrumentation/tacan.cxx @@ -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