Fixed bug that could have caused X-Plane to stop displaying status messages.

This commit is contained in:
Mathew Sutcliffe
2015-12-10 17:07:48 +00:00
parent ecf02621cd
commit 51efdca8cc

View File

@@ -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())
{