[discident-glib] lib: Fix returning of barcode and image URL
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [discident-glib] lib: Fix returning of barcode and image URL
- Date: Tue, 2 Apr 2013 13:49:08 +0000 (UTC)
commit b499deadbb68cc01cdb737c7d983a70d5913f73e
Author: Bastien Nocera <hadess hadess net>
Date: Mon Apr 1 01:18:27 2013 +0200
lib: Fix returning of barcode and image URL
We were checking for the wrong values (*img_url instead of img_url
for example), so we were only returning values if the input values
happened to contain garbage (as was the case in C, but not in
JavaScript).
discident-glib/discident-ean-glib.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/discident-glib/discident-ean-glib.c b/discident-glib/discident-ean-glib.c
index e75c4ac..f3dbc9b 100644
--- a/discident-glib/discident-ean-glib.c
+++ b/discident-glib/discident-ean-glib.c
@@ -537,9 +537,9 @@ discident_ean_lookup_finish (DiscidentEan *ean,
goto out;
ret = g_simple_async_result_get_op_res_gpointer (simple);
- if (*img_url != NULL)
+ if (img_url != NULL)
*img_url = g_strdup (g_object_get_data (G_OBJECT (res), "image-url"));
- if (*barcode != NULL)
+ if (barcode != NULL)
*barcode = g_strdup (g_object_get_data (G_OBJECT (res), "barcode"));
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]