mirror of
https://github.com/brl/mutter.git
synced 2025-01-27 20:08:56 +00:00
selection: Return an error if trying to transfer from NULL source
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
This commit is contained in:
parent
c9e7cf4ea1
commit
6c0a917832
@ -438,6 +438,13 @@ meta_selection_transfer_async (MetaSelection *selection,
|
|||||||
task = g_task_new (selection, cancellable, callback, user_data);
|
task = g_task_new (selection, cancellable, callback, user_data);
|
||||||
g_task_set_source_tag (task, meta_selection_transfer_async);
|
g_task_set_source_tag (task, meta_selection_transfer_async);
|
||||||
|
|
||||||
|
if (!selection->owners[selection_type])
|
||||||
|
{
|
||||||
|
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
|
||||||
|
"Tried to transfer from NULL selection source");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
transfer_request = transfer_request_new (output, selection_type, size,
|
transfer_request = transfer_request_new (output, selection_type, size,
|
||||||
cancellable);
|
cancellable);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user