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
This commit is contained in:
Ismael Asensio 2022-01-07 21:16:04 +00:00
parent d13c39bec6
commit 72c0974a06

View file

@ -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);