From b1b6b5c7903144ac5d19e82ca0f6299280d1f4dc Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Sun, 21 Nov 2021 08:54:22 +0100 Subject: [PATCH] do not send empty lists --- src/PlugIn.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/PlugIn.cpp b/src/PlugIn.cpp index 644f9f9..dac7087 100644 --- a/src/PlugIn.cpp +++ b/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(); }