diff --git a/src/plugins/simulator/fscommon/simulatorfscommon.cpp b/src/plugins/simulator/fscommon/simulatorfscommon.cpp index ae0175110..b4e7fe130 100644 --- a/src/plugins/simulator/fscommon/simulatorfscommon.cpp +++ b/src/plugins/simulator/fscommon/simulatorfscommon.cpp @@ -109,7 +109,9 @@ namespace BlackSimPlugin bool CSimulatorFsCommon::changeRemoteAircraftModel(const CSimulatedAircraft &aircraft) { // remove upfront, and then enable / disable again - this->physicallyRemoveRemoteAircraft(aircraft.getCallsign()); + auto callsign = aircraft.getCallsign(); + if (!isPhysicallyRenderedAircraft(callsign)) { return false; } + this->physicallyRemoveRemoteAircraft(callsign); return this->changeRemoteAircraftEnabled(aircraft); } diff --git a/src/plugins/simulator/xplane/simulatorxplane.cpp b/src/plugins/simulator/xplane/simulatorxplane.cpp index 57e26acc8..e33fa3215 100644 --- a/src/plugins/simulator/xplane/simulatorxplane.cpp +++ b/src/plugins/simulator/xplane/simulatorxplane.cpp @@ -532,7 +532,9 @@ namespace BlackSimPlugin bool CSimulatorXPlane::changeRemoteAircraftModel(const CSimulatedAircraft &aircraft) { // remove upfront, and then enable / disable again - this->physicallyRemoveRemoteAircraft(aircraft.getCallsign()); + auto callsign = aircraft.getCallsign(); + if (!isPhysicallyRenderedAircraft(callsign)) { return false; } + this->physicallyRemoveRemoteAircraft(callsign); return this->changeRemoteAircraftEnabled(aircraft); }