X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAutopilot%2Fautobrake.cxx;h=ec1fcfc0e1aa67e55ddbf8caddbb3df0328d3784;hb=be13f1f3aced11ce844204b6a0c97365a3e069ca;hp=053c55e89888e67501a113e6491568d32a02d204;hpb=4ccef76fc4ffae48ff58d81eb28692580dc7bd88;p=flightgear.git diff --git a/src/Autopilot/autobrake.cxx b/src/Autopilot/autobrake.cxx index 053c55e89..ec1fcfc0e 100644 --- a/src/Autopilot/autobrake.cxx +++ b/src/Autopilot/autobrake.cxx @@ -96,6 +96,10 @@ void FGAutoBrake::postinit() { _weightOnWheelsNode = fgGetNode("/gear/gear/wow"); _groundspeedNode = fgGetNode("/velocities/groundspeed-kt"); + if (!_weightOnWheelsNode) { + return; // don't crash if we're using an acft (UFO, ATC, with no WoW flag) + } + _lastWoW = _weightOnWheelsNode->getBoolValue(); }