mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
wlr_pointer: fix potential null deref
if pointer is null here we'd access pointer->events... anyway
This commit is contained in:
parent
d5e14ab247
commit
e86cd4dc33
1 changed files with 4 additions and 1 deletions
|
|
@ -14,7 +14,10 @@ void wlr_pointer_init(struct wlr_pointer *pointer,
|
|||
}
|
||||
|
||||
void wlr_pointer_destroy(struct wlr_pointer *pointer) {
|
||||
if (pointer && pointer->impl && pointer->impl->destroy) {
|
||||
if (!pointer) {
|
||||
return;
|
||||
}
|
||||
if (pointer->impl && pointer->impl->destroy) {
|
||||
pointer->impl->destroy(pointer);
|
||||
} else {
|
||||
wl_list_remove(&pointer->events.motion.listener_list);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue