From: curt Date: Wed, 24 Sep 2003 19:57:50 +0000 (+0000) Subject: Fix a potential segfault. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c841343796934a9a44369a2299e0b9e47aeaf7fe;p=flightgear.git Fix a potential segfault. --- diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index 6c215c6d5..c7537598f 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -168,7 +168,7 @@ void FGProps2NetCtrls( FGNetCtrls *net, bool honor_freezes, tempnode = fgGetNode("/controls/gear", true); for ( i = 0; i < FGNetCtrls::FG_MAX_WHEELS; ++i ) { node = fgGetNode("/controls/gear/wheel", i); - if ( node->getChild("brake") != NULL ) { + if ( node != NULL && node->getChild("brake") != NULL ) { if ( tempnode->getChild("parking-brake")->getDoubleValue() > 0.0 ) { net->brake[i] = 1.0; } else {