소스 검색

do not send empty lists

Sven Czarnian 3 년 전
부모
커밋
b1b6b5c790
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/PlugIn.cpp

+ 5 - 3
src/PlugIn.cpp

@@ -470,9 +470,11 @@ void PlugIn::OnTimer(int counter) {
         }
 
         /* send the report */
-        auto sequence = Backend::instance().update(update);
-        if (true == inserted && nullptr != sequence)
-            this->DisplayUserMessage(PLUGIN_NAME, "ERROR", "Unable to send a new aircraft report update", true, true, true, true, true);
+        if (true == inserted) {
+            auto sequence = Backend::instance().update(update);
+            if (nullptr != sequence)
+                this->DisplayUserMessage(PLUGIN_NAME, "ERROR", "Unable to send a new aircraft report update", true, true, true, true, true);
+        }
 
         airport.second.clear();
     }