mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
data-device: fix use-after-free on drop
This commit is contained in:
parent
a37dfb380b
commit
c505ce3019
1 changed files with 2 additions and 0 deletions
|
@ -174,7 +174,9 @@ static uint32_t drag_handle_pointer_button(struct wlr_seat_pointer_grab *grab,
|
|||
};
|
||||
wlr_signal_emit_safe(&drag->events.drop, &event);
|
||||
} else if (drag->source->impl->dnd_finish) {
|
||||
// This will end the grab and free `drag`
|
||||
wlr_data_source_destroy(drag->source);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue