Merge branch 'file-chooser-dnd-crash' into 'main'

filechooserwidget: Fix file chooser crash when dropping empty file list

See merge request GNOME/gtk!5456
This commit is contained in:
Matthias Clasen 2023-01-30 19:28:24 +00:00
commit cab5f2bd8d

View File

@ -1566,6 +1566,9 @@ file_list_drag_drop_cb (GtkDropTarget *dest,
files = g_value_get_boxed (value);
if (files == NULL)
return TRUE;
data = g_new0 (FileListDragData, 1);
data->impl = g_object_ref (impl);
data->files = g_slist_copy_deep (files, (GCopyFunc) g_object_ref, NULL);