From 72c0974a0604f50ca38138814942b6cedfccfc0e Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Fri, 7 Jan 2022 21:16:04 +0000 Subject: [PATCH] DesktopGridEffect: Fix crash when closing the effect If the first condition would match (for instance after moving a window), `windowMove` would be `nullptr`, triggering the crash later. By the looks of it, it was maybe a typo. BUG: 445335 FIXED-IN: 5.24 CC: @nicolasfella --- src/effects/desktopgrid/desktopgrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/desktopgrid/desktopgrid.cpp b/src/effects/desktopgrid/desktopgrid.cpp index 1faea0db8a..e444d9ff4c 100644 --- a/src/effects/desktopgrid/desktopgrid.cpp +++ b/src/effects/desktopgrid/desktopgrid.cpp @@ -445,7 +445,7 @@ void DesktopGridEffect::slotWindowClosed(EffectWindow* w) windowMove = nullptr; } if (isUsingPresentWindows()) { - const auto desktops = desktopList(windowMove); + const auto desktops = desktopList(w); for (const int i : desktops) { WindowMotionManager& manager = m_managers[w->screen()][i]; manager.unmanage(w);