From 81497b76c56ec514f0643ecfb540b33492b2a946 Mon Sep 17 00:00:00 2001 From: buffet Date: Tue, 24 Dec 2019 16:09:22 +0000 Subject: [PATCH] Move wl_list_remove(view::link) to the top of the bunch --- kiwmi/desktop/xdg_shell.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kiwmi/desktop/xdg_shell.c b/kiwmi/desktop/xdg_shell.c index 23e8988..4a1fa54 100644 --- a/kiwmi/desktop/xdg_shell.c +++ b/kiwmi/desktop/xdg_shell.c @@ -34,12 +34,11 @@ xdg_surface_destroy_notify(struct wl_listener *listener, void *UNUSED(data)) { struct kiwmi_view *view = wl_container_of(listener, view, destroy); + wl_list_remove(&view->link); wl_list_remove(&view->map.link); wl_list_remove(&view->unmap.link); wl_list_remove(&view->destroy.link); - wl_list_remove(&view->link); - free(view); }