view: cancel pending auto-raise on view destroy

The pending_auto_raise_view pointer would become dangling if the
view it references is destroyed before the timer fires. Clear it
in view_destroy() alongside the existing active_view cleanup.
This commit is contained in:
Jos Dehaes 2026-04-15 14:36:33 +02:00 committed by Johan Malm
parent 28908adfbe
commit ecc5565686

View file

@ -2521,6 +2521,10 @@ view_destroy(struct view *view)
server.active_view = NULL; server.active_view = NULL;
} }
if (server.pending_auto_raise_view == view) {
desktop_cancel_pending_auto_raise();
}
if (server.session_lock_manager->last_active_view == view) { if (server.session_lock_manager->last_active_view == view) {
server.session_lock_manager->last_active_view = NULL; server.session_lock_manager->last_active_view = NULL;
} }