From 8bfa207472d095ad1532d4bffce2889e0e2958aa Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Tue, 22 Jul 2025 12:43:29 +0200 Subject: [PATCH] Fix TrendCheck creating Quality without a name A default Quality would be created when TrendCheck::beautify was trying to access a non-existent entry in mQualities map. When using operator[] with a missing key, the object is added using the default constructor, so Quality(10, "") was being created. This was causing crashes in QualityTask, which was relying on a non-empty Quality name to be there. --- Modules/Common/src/TrendCheck.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/Common/src/TrendCheck.cxx b/Modules/Common/src/TrendCheck.cxx index 0cf1e6c242..c0b305506d 100644 --- a/Modules/Common/src/TrendCheck.cxx +++ b/Modules/Common/src/TrendCheck.cxx @@ -436,6 +436,9 @@ void TrendCheck::beautify(std::shared_ptr mo, Quality checkResult auto graphName = moName + "_" + std::to_string(graphIndex); + if (!mQualities.contains(graphName)) { + continue; + } Quality quality = mQualities[graphName]; if (mThresholdsTrendMedium.count(graphName) > 0) {