mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
mir: properly handle empty clipboard
https://bugzilla.gnome.org/show_bug.cgi?id=775732
This commit is contained in:
parent
ea58ebe76d
commit
a50a98f38b
@ -743,10 +743,16 @@ gdk_mir_display_real_convert_selection (GdkDisplay *display,
|
||||
|
||||
paste_data = g_variant_get_fixed_array (mir_display->paste_data, &paste_size, sizeof (guchar));
|
||||
paste_header = (const gint *) paste_data;
|
||||
|
||||
if (paste_data)
|
||||
{
|
||||
paste_formats = g_ptr_array_new_full (paste_header[0], g_free);
|
||||
|
||||
for (i = 0; i < paste_header[0]; i++)
|
||||
g_ptr_array_add (paste_formats, g_strndup (paste_data + paste_header[1 + 4 * i], paste_header[2 + 4 * i]));
|
||||
}
|
||||
else
|
||||
paste_formats = g_ptr_array_new_with_free_func (g_free);
|
||||
|
||||
if (target == gdk_atom_intern_static_string ("TARGETS"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user