From 7340301c290d2fa80eb979b887d16e470d3e385e Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Fri, 24 May 2019 23:53:40 +0200 Subject: [PATCH] No ASSERT when missing callsign/ids, VERIFY is enough --- src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp index e093ef856..8c7e71e2e 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp @@ -1942,8 +1942,11 @@ namespace BlackSimPlugin if (!simObject.hasCurrentLightsInSimulator()) { continue; } // wait until we have light state const CCallsign callsign(simObject.getCallsign()); - Q_ASSERT_X(!callsign.isEmpty(), Q_FUNC_INFO, "missing callsign"); - Q_ASSERT_X(simObject.hasValidRequestAndObjectId(), Q_FUNC_INFO, "Missing ids"); + const bool hasCs = !callsign.isEmpty(); + const bool hasValidIds = simObject.hasValidRequestAndObjectId(); + BLACK_VERIFY_X(hasCs, Q_FUNC_INFO, "missing callsign"); + BLACK_AUDIT_X(hasValidIds, Q_FUNC_INFO, "Missing ids"); + if (!hasCs || !hasValidIds) { continue; } // not supposed to happen const DWORD objectId = simObject.getObjectId(); // setup