mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-04 13:29:51 -05:00
data-device: Fix list corruption when the source goes away
If the data source is destroyed, the corresponding offers may stay around for a little longer (until the owning client destroys it). When the offer is finally destroyed, we have to be careful to only remove the source destroy listener if the source hasn't yet been destroyed. Thanks to Martin Minarik for tracking down where the corruption happened.
This commit is contained in:
parent
b576443a0e
commit
c806dde7e6
1 changed files with 2 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ destroy_data_offer(struct wl_resource *resource)
|
|||
{
|
||||
struct wl_data_offer *offer = resource->data;
|
||||
|
||||
if (offer->source)
|
||||
wl_list_remove(&offer->source_destroy_listener.link);
|
||||
free(offer);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue