Commit 9b8148da authored by Matthias Clasen's avatar Matthias Clasen

portal: Fix error handling

We can get a D-Bus error back here, and we need to free
the reply in any case.
parent 10c3e4af
......@@ -214,6 +214,10 @@ open_file_msg_cb (GObject *source_object,
GError *error = NULL;
reply = g_dbus_connection_send_message_with_reply_finish (data->connection, res, &error);
if (reply && g_dbus_message_to_gerror (reply, &error))
g_clear_object (&reply);
if (reply == NULL)
{
if (!data->hidden)
......@@ -231,8 +235,9 @@ open_file_msg_cb (GObject *source_object,
/* The dialog was hidden before we got the handle, close it now */
send_close (data);
filechooser_portal_data_free (data);
return;
}
g_object_unref (reply);
}
static GVariant *
......
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