[tracker] Fixes NB#196143, tracker-info core dumps with NULL cursor getting prefixes
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fixes NB#196143, tracker-info core dumps with NULL cursor getting prefixes
- Date: Tue, 5 Oct 2010 10:04:48 +0000 (UTC)
commit 987e5f2e69bad841fd22730ef0ddc5c628d362fc
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]