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 GitHub
parent c4b8b53198
commit 5ae9eed1ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 */
};