From 8c87b32656420d205b3599a9479cbdae29449b69 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 9 Oct 2024 16:28:22 +0200 Subject: [PATCH] Valgrind: Fix a crash on shutdown Ignore engineFinished() on shutdown while callgrind was still running. At this stage the m_errorView, which was added to the perspective, is already gone. Amends 931f8d84ac0300d50ca8bd3e8919ca8b6537ec98 Change-Id: Idf31f9eb761606330184a9f767c7f63a4f1167dc Reviewed-by: hjk --- src/plugins/valgrind/callgrindtool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 3d3c42832c9..abab7340e6d 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -768,6 +768,9 @@ void CallgrindTool::clearTextMarks() void CallgrindTool::engineFinished() { + if (m_flatView == nullptr) // Happens on shutdown when memcheck is still running. + return; + m_toolBusy = false; updateRunActions();