mirror of
https://github.com/brl/mutter.git
synced 2025-01-13 13:12:28 +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);
|
||||
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,
|
||||
cancellable);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user