1
0
Fork 0

Groundnet parsing: Fix exception for missing value

Sentry-Id: FLIGHTGEAR-CJ
This commit is contained in:
James Turner 2020-10-25 20:10:09 +00:00
parent 358fb70ee0
commit a21c0f9c16

View file

@ -123,7 +123,7 @@ void FGGroundNetXMLLoader::startParking(const XMLAttributes &atts)
else if (attname == "pushBackRoute") {
const string attrVal = atts.getValue(i);
try {
if (attrVal == "None") {
if (attrVal.empty() || (attrVal == "None")) {
pushBackRoute = -2;
} else {
pushBackRoute = simgear::strutils::readNonNegativeInt<int>(attrVal);