mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
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