mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-11-03 01:58:24 +00:00
window: Fix use-after-free in menu button handler
Commit d2fbb3870c
introduced a use-after-free
error in the case where we destroy the menu.
This commit is contained in:
parent
efb948846f
commit
e77d7577a2
1 changed files with 2 additions and 3 deletions
|
@ -3363,10 +3363,9 @@ menu_button_handler(struct widget *widget,
|
|||
menu->current, menu->window->parent->user_data);
|
||||
input_ungrab(input);
|
||||
menu_destroy(menu);
|
||||
}
|
||||
|
||||
if (state == WL_POINTER_BUTTON_STATE_RELEASED)
|
||||
} else if (state == WL_POINTER_BUTTON_STATE_RELEASED) {
|
||||
menu->release_count++;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue