From 51efdca8ccfeb65081584b4d839c04b8a892ac97 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Thu, 10 Dec 2015 17:07:48 +0000 Subject: [PATCH] Fixed bug that could have caused X-Plane to stop displaying status messages. --- src/plugins/simulator/xplane/simulatorxplane.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/simulator/xplane/simulatorxplane.cpp b/src/plugins/simulator/xplane/simulatorxplane.cpp index d042ca2d3..c6901c2c5 100644 --- a/src/plugins/simulator/xplane/simulatorxplane.cpp +++ b/src/plugins/simulator/xplane/simulatorxplane.cpp @@ -267,14 +267,14 @@ namespace BlackSimPlugin void CSimulatorXPlane::displayStatusMessage(const BlackMisc::CStatusMessage &message) const { + // No assert here as status message may come because of network problems + if (!isConnected()) { return; } + // avoid infinite recursion in case this function is called due to a message caused by this very function static bool isInFunction = false; if (isInFunction) { return; } isInFunction = true; - /* We do not assert here as status message may come because of network problems */ - if (!isConnected()) { return; } - QColor color; switch (message.getSeverity()) {