Commit b04a8633 authored by Matthias Clasen's avatar Matthias Clasen

Avoid a critical warning in the filechooser portal

This was showing up when cancelling a portal file chooser
in recipes.
parent 122cbcf1
......@@ -110,15 +110,17 @@ response_cb (GDBusConnection *connection,
choices = g_variant_lookup_value (response_data, "choices", G_VARIANT_TYPE ("a(ss)"));
if (choices)
for (i = 0; i < g_variant_n_children (choices); i++)
{
const char *id;
const char *selected;
g_variant_get_child (choices, i, "(&s&s)", &id, &selected);
gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (self), id, selected);
}
g_variant_unref (choices);
{
for (i = 0; i < g_variant_n_children (choices); i++)
{
const char *id;
const char *selected;
g_variant_get_child (choices, i, "(&s&s)", &id, &selected);
gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (self), id, selected);
}
g_variant_unref (choices);
}
g_slist_free_full (self->custom_files, g_object_unref);
self->custom_files = NULL;
for (i = 0; uris[i]; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment