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 <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791720
This commit is contained in:
Philip Withnall 2017-12-18 19:05:57 +00:00
parent eba53aa07e
commit 84350cb566

View File

@ -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)