mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
menu: fix UAF in client-list-combined-menu after window destruction
Update client-list-combined-menu when a window is destroyed to avoid SEGFAULT when selecting an that window entry in it.
This commit is contained in:
parent
2b1a694154
commit
e912964f73
3 changed files with 32 additions and 5 deletions
|
|
@ -2453,11 +2453,7 @@ view_destroy(struct view *view)
|
|||
}
|
||||
}
|
||||
|
||||
/* If we spawned a window menu, close it */
|
||||
if (server->menu_current
|
||||
&& server->menu_current->triggered_by_view == view) {
|
||||
menu_close_root(server);
|
||||
}
|
||||
menu_on_view_destroy(view);
|
||||
|
||||
/*
|
||||
* Destroy the view's scene tree. View methods assume this is non-NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue