diff --git a/src/lib/bluez/obex/obex_file_transfer.c b/src/lib/bluez/obex/obex_file_transfer.c index 2d3dafe..91c41d6 100644 --- a/src/lib/bluez/obex/obex_file_transfer.c +++ b/src/lib/bluez/obex/obex_file_transfer.c @@ -194,7 +194,7 @@ GVariant *obex_file_transfer_get_file(ObexFileTransfer *self, const gchar *targe g_assert(OBEX_FILE_TRANSFER_IS(self)); GVariant *ret = NULL; GVariant *proxy_ret = g_dbus_proxy_call_sync(self->priv->proxy, "GetFile", g_variant_new ("(ss)", targetfile, sourcefile), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); - if (proxy_ret != NULL) + if (proxy_ret == NULL) return NULL; ret = g_variant_ref_sink(proxy_ret); g_variant_unref(proxy_ret); @@ -228,9 +228,9 @@ GVariant *obex_file_transfer_put_file(ObexFileTransfer *self, const gchar *sourc g_assert(OBEX_FILE_TRANSFER_IS(self)); GVariant *ret = NULL; GVariant *proxy_ret = g_dbus_proxy_call_sync(self->priv->proxy, "PutFile", g_variant_new ("(ss)", targetfile, sourcefile), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); - if (proxy_ret != NULL) + if (proxy_ret == NULL) return NULL; ret = g_variant_ref_sink(proxy_ret); g_variant_unref(proxy_ret); return ret; -} \ No newline at end of file +}