From a2e0a55d2e7e8d883a2948f740492eabdb07057b Mon Sep 17 00:00:00 2001 From: project-repo Date: Sat, 24 Oct 2020 09:45:33 +0200 Subject: [PATCH] Fix potential npd on view destroy. --- xdg_shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdg_shell.c b/xdg_shell.c index 35c170c..514ce97 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -282,6 +282,7 @@ handle_xdg_shell_surface_unmap(struct wl_listener *listener, void *_data) { wl_container_of(listener, xdg_shell_view, unmap); struct cg_view *view = &xdg_shell_view->view; + wl_list_remove(&xdg_shell_view->new_popup.link); wl_list_remove(&xdg_shell_view->commit.link); view_unmap(view); @@ -316,7 +317,6 @@ handle_xdg_shell_surface_destroy(struct wl_listener *listener, void *_data) { wl_list_remove(&xdg_shell_view->unmap.link); wl_list_remove(&xdg_shell_view->destroy.link); wl_list_remove(&xdg_shell_view->request_fullscreen.link); - wl_list_remove(&xdg_shell_view->new_popup.link); xdg_shell_view->xdg_surface = NULL; view_destroy(view);