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
|
@ -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…
Reference in New Issue