From 84350cb5666feb1cd459562e438d50cca08c6405 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 18 Dec 2017 19:05:57 +0000 Subject: [PATCH] gopenuriportal: Fix mismatched types in callback The source object for this asynchronous operation is the GXdpOpenURI, not a GDBusConnection. This was causing crashes in method calls on the connection, unsurprisingly. Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=791720 --- gio/gopenuriportal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)