src/menu: prevent delayed pipe menu response on item destroy (#2094)

Without this patch we would happily access `pipe_ctx->item`
members even if the item had been destroyed in the meantime.
This commit is contained in:
Consolatis 2024-08-20 18:09:17 +02:00 committed by Johan Malm
parent 2aa9e1143b
commit 7de2a9f86a
2 changed files with 41 additions and 18 deletions

View file

@ -39,6 +39,7 @@ struct menuitem {
struct wlr_scene_tree *tree;
struct menu_scene normal;
struct menu_scene selected;
struct menu_pipe_context *pipe_ctx;
struct wl_list link; /* menu.menuitems */
};