Ver Fonte

check if the reporter is initialized

Sven Czarnian há 3 anos atrás
pai
commit
c6677761dd
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/PlugIn.cpp

+ 2 - 2
src/PlugIn.cpp

@@ -126,8 +126,8 @@ aman::Aircraft* PlugIn::generateAircraftMessage(const EuroScopePlugIn::CRadarTar
 }
 
 void PlugIn::OnRadarTargetPositionUpdate(EuroScopePlugIn::CRadarTarget radarTarget) {
-    /* ignore invalid targets */
-    if (false == radarTarget.IsValid())
+    /* do nothing if the reporter is not initialized and ignore invalid targets */
+    if (false == AircraftReporter::instance().initialized() || false == radarTarget.IsValid())
         return;
 
     auto flightPlan = radarTarget.GetCorrelatedFlightPlan();