diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c index 51a72dfc2..247ed8ce7 100644 --- a/gio/gopenuriportal.c +++ b/gio/gopenuriportal.c @@ -197,7 +197,8 @@ open_call_done (GObject *source, GAsyncResult *result, gpointer user_data) { - GDBusConnection *connection = G_DBUS_CONNECTION (source); + GXdpOpenURI *openuri = GXDP_OPEN_URI (source); + GDBusConnection *connection; GTask *task = user_data; GError *error = NULL; gboolean open_file; @@ -206,6 +207,7 @@ open_call_done (GObject *source, const char *handle; guint signal_id; + connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (openuri)); open_file = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (task), "open-file")); if (open_file)