1
0
Fork 0

Fix another crash in the autobrake code, with 'aircraft' (eg, ATC) with no weight-on-wheels flag. Thanks to Jacob Burbach for the report.

This commit is contained in:
jmt 2009-10-03 10:28:48 +00:00 committed by Tim Moore
parent 4ccef76fc4
commit 26cd4f92c5

View file

@ -96,6 +96,10 @@ void FGAutoBrake::postinit()
{ {
_weightOnWheelsNode = fgGetNode("/gear/gear/wow"); _weightOnWheelsNode = fgGetNode("/gear/gear/wow");
_groundspeedNode = fgGetNode("/velocities/groundspeed-kt"); _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(); _lastWoW = _weightOnWheelsNode->getBoolValue();
} }