wayland: Check that the data device supports the release method before calling it
parent
4454dc400b
commit
9667aa18e6
|
@ -2759,7 +2759,11 @@ void Wayland_display_destroy_input(SDL_VideoData *d)
|
|||
Wayland_data_offer_destroy(input->data_device->drag_offer);
|
||||
}
|
||||
if (input->data_device->data_device != NULL) {
|
||||
wl_data_device_release(input->data_device->data_device);
|
||||
if (wl_data_device_get_version(input->data_device->data_device) >= WL_DATA_DEVICE_RELEASE_SINCE_VERSION) {
|
||||
wl_data_device_release(input->data_device->data_device);
|
||||
} else {
|
||||
wl_data_device_destroy(input->data_device->data_device);
|
||||
}
|
||||
}
|
||||
SDL_free(input->data_device);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue