[bijiben] Move g_variant_builder_open() inside if
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] Move g_variant_builder_open() inside if
- Date: Thu, 30 May 2013 21:07:36 +0000 (UTC)
commit 3648a65b302dacebcba921d9c62475c2e1e7f42b
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun May 26 18:53:15 2013 +0300
Move g_variant_builder_open() inside if
In add_single_note_meta() results are put to GVariant conditionally,
but a call to open is unconditional (while close is conditional).
Fixes Bug 701054.
src/bijiben-shell-search-provider.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/bijiben-shell-search-provider.c b/src/bijiben-shell-search-provider.c
index 6bfefb2..4b57d5d 100644
--- a/src/bijiben-shell-search-provider.c
+++ b/src/bijiben-shell-search-provider.c
@@ -250,10 +250,10 @@ add_single_note_meta (BijibenShellSearchProviderApp *self,
cursor = bjb_perform_query (self, query);
g_free (query);
- g_variant_builder_open (results, G_VARIANT_TYPE ("a{sv}"));
-
if (tracker_sparql_cursor_next (cursor, NULL, NULL))
{
+ g_variant_builder_open (results, G_VARIANT_TYPE ("a{sv}"));
+
/* NIE:URL (id) */
url = tracker_sparql_cursor_get_string (cursor, 0, 0);
g_variant_builder_add (results, "{sv}", "id", g_variant_new_string (url));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]