[xswiftbus] Check if plane exists already before adding a new one

This commit is contained in:
Roland Winklmeier
2018-05-07 11:54:16 +02:00
committed by Klaus Basan
parent 48b1b78d81
commit dab41045d3

View File

@@ -212,6 +212,9 @@ namespace XSwiftBus
void CTraffic::addPlane(const std::string &callsign, const std::string &modelName, const std::string &aircraftIcao, const std::string &airlineIcao, const std::string &livery)
{
auto planeIt = m_planesByCallsign.find(callsign);
if (planeIt != m_planesByCallsign.end()) { return; }
XPMPPlaneID id = nullptr;
if (modelName.empty())
{