From 931f8d84ac0300d50ca8bd3e8919ca8b6537ec98 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 9 Oct 2024 14:33:45 +0200 Subject: [PATCH] Valgrind: Fix a crash on shutdown Ignore engineFinished() on shutdown while memcheck was still running. At this stage the m_errorView, which was added to the perspective, is already gone. Change-Id: I5f872ee2f14c2d864ac45a248c2d267d28677661 Reviewed-by: hjk --- src/plugins/valgrind/memchecktool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index b666bd2f7d4..6daebe42a3c 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -1108,6 +1108,9 @@ int MemcheckTool::updateUiAfterFinishedHelper() void MemcheckTool::engineFinished() { + if (m_errorView == nullptr) // Happens on shutdown when memcheck is still running. + return; + m_toolBusy = false; updateRunActions();