[tracker/rss-enclosures] Fixes NB#196143, tracker-info core dumps with NULL cursor getting prefixes
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] Fixes NB#196143, tracker-info core dumps with NULL cursor getting prefixes
- Date: Wed, 24 Nov 2010 01:55:57 +0000 (UTC)
commit 422f8bcf328dba2dd443d5320aa519ab41146fa4
Author: Martyn Russell <martyn lanedo com>
Date: Tue Oct 5 10:56:47 2010 +0100
Fixes NB#196143, tracker-info core dumps with NULL cursor getting prefixes
src/tracker-utils/tracker-info.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-utils/tracker-info.c b/src/tracker-utils/tracker-info.c
index 5c39724..f6efedb 100644
--- a/src/tracker-utils/tracker-info.c
+++ b/src/tracker-utils/tracker-info.c
@@ -126,6 +126,20 @@ get_prefixes (TrackerSparqlConnection *connection)
cursor = tracker_sparql_connection_query (connection, query, NULL, &error);
+ if (error) {
+ g_printerr ("%s, %s\n",
+ _("Unable to retrieve namespace prefixes"),
+ error->message);
+
+ g_error_free (error);
+ return retval;
+ }
+
+ if (!cursor) {
+ g_printerr ("%s\n", _("No namespace prefixes were returned"));
+ return retval;
+ }
+
while (tracker_sparql_cursor_next (cursor, NULL, NULL)) {
const gchar *key, *value;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]