Avoid crash by checking disconnected before requesting elevation

This commit is contained in:
Klaus Basan
2018-12-11 21:34:14 +01:00
parent 7a8ae85b5a
commit f841d57448

View File

@@ -160,7 +160,7 @@ namespace BlackSimPlugin
bool CSimulatorXPlane::requestElevation(const ICoordinateGeodetic &reference, const CCallsign &callsign) bool CSimulatorXPlane::requestElevation(const ICoordinateGeodetic &reference, const CCallsign &callsign)
{ {
if (this->isShuttingDown()) { return false; } if (this->isShuttingDownOrDisconnected()) { return false; }
if (reference.isNull()) { return false; } if (reference.isNull()) { return false; }
CCoordinateGeodetic pos(reference); CCoordinateGeodetic pos(reference);