wayland: don't get data device if wl_seat is null

This commit is contained in:
dudemanguy
2019-10-21 08:30:55 -05:00
committed by Dudemanguy
parent e82bf5f91d
commit f7881ea573

View File

@@ -1085,10 +1085,10 @@ int vo_wayland_init(struct vo *vo)
if (create_xdg_surface(wl)) if (create_xdg_surface(wl))
return false; return false;
if (wl->dnd_devman) { if (wl->dnd_devman && wl->seat) {
wl->dnd_ddev = wl_data_device_manager_get_data_device(wl->dnd_devman, wl->seat); wl->dnd_ddev = wl_data_device_manager_get_data_device(wl->dnd_devman, wl->seat);
wl_data_device_add_listener(wl->dnd_ddev, &data_device_listener, wl); wl_data_device_add_listener(wl->dnd_ddev, &data_device_listener, wl);
} else { } else if (!wl->dnd_devman) {
MP_VERBOSE(wl, "Compositor doesn't support the %s (ver. 3) protocol!\n", MP_VERBOSE(wl, "Compositor doesn't support the %s (ver. 3) protocol!\n",
wl_data_device_manager_interface.name); wl_data_device_manager_interface.name);
} }