wayland: Accept NULL primary data source
A NULL argument is expected here in order to unset the selection, meta_wayland_data_device_set_primary() accepts a NULL source, but gtk_primary_selection_device.set_selection was not handling a NULL wl_resource. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/335
This commit is contained in:
parent
e9778eba18
commit
60d22b7cd0
@ -1734,8 +1734,9 @@ primary_device_set_selection (struct wl_client *client,
|
||||
uint32_t serial)
|
||||
{
|
||||
MetaWaylandDataDevice *data_device = wl_resource_get_user_data (resource);
|
||||
MetaWaylandDataSource *source;
|
||||
MetaWaylandDataSource *source = NULL;
|
||||
|
||||
if (source_resource)
|
||||
source = wl_resource_get_user_data (source_resource);
|
||||
meta_wayland_data_device_set_primary (data_device, source, serial);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user