From ff06cf1935ca7e7c419518210e537cb9b5f5aaf7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 19 Apr 2026 10:16:13 +0000 Subject: [PATCH] freqdisplay: fix crash on exit transparent mode by using deleteLater() Agent-Logs-Url: https://github.com/srcejon/sdrangel/sessions/9fb3e940-7f8e-46a9-8095-5ebc03428c00 Co-authored-by: srcejon <57259258+srcejon@users.noreply.github.com> --- plugins/feature/freqdisplay/freqdisplaygui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/feature/freqdisplay/freqdisplaygui.cpp b/plugins/feature/freqdisplay/freqdisplaygui.cpp index 7cb84431f..741b0bdad 100644 --- a/plugins/feature/freqdisplay/freqdisplaygui.cpp +++ b/plugins/feature/freqdisplay/freqdisplaygui.cpp @@ -569,7 +569,13 @@ void FreqDisplayGUI::applyTransparency() { if (m_overlay) { - delete m_overlay; + // Hide immediately so the overlay disappears at once, then schedule + // deletion for after the current event-loop iteration. Plain delete + // would crash here because onExitTransparentMode() is invoked via a + // signal emitted from inside the overlay's contextMenuEvent(), which + // is still on the call stack when we reach this point. + m_overlay->hide(); + m_overlay->deleteLater(); m_overlay = nullptr; } show();