From 886f0e852be6a7c3ee0e6d703aa9615e103ce07c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 15 May 2024 11:47:46 +0300 Subject: [PATCH] Disconnect Workspace::outputsChanged from InputPanelV1Window when it's closed Otherwise the input panel window can be repositioned after it's closed, which will crash. --- src/inputpanelv1window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inputpanelv1window.cpp b/src/inputpanelv1window.cpp index d7e96a7cc0..268bf7577b 100644 --- a/src/inputpanelv1window.cpp +++ b/src/inputpanelv1window.cpp @@ -78,6 +78,7 @@ void InputPanelV1Window::hide() void InputPanelV1Window::reposition() { + Q_ASSERT(!isDeleted()); if (!readyForPainting()) { return; } @@ -164,6 +165,7 @@ void InputPanelV1Window::destroyWindow() { m_panelSurface->disconnect(this); m_panelSurface->surface()->disconnect(this); + disconnect(workspace(), &Workspace::outputsChanged, this, &InputPanelV1Window::reposition); markAsDeleted();