mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Avoid crash by checking disconnected before requesting elevation
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user