[tracker/tracker-0.8] SPARQL: Warn instead of crash on namespace without prefix
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] SPARQL: Warn instead of crash on namespace without prefix
- Date: Thu, 10 Jun 2010 13:11:39 +0000 (UTC)
commit 63f06dfdf7f7207c0c083424d67499f7a71cee22
Author: Jürg Billeter <j bitron ch>
Date: Mon Jun 7 13:37:56 2010 +0200
SPARQL: Warn instead of crash on namespace without prefix
src/libtracker-data/tracker-sparql-query.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index 07fe90f..e9991e7 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -382,6 +382,10 @@ public class Tracker.Sparql.Query : Object {
prefix_map.insert ("fn", FN_NS);
foreach (Namespace ns in Ontologies.get_namespaces ()) {
+ if (ns.prefix == null) {
+ critical ("Namespace does not specify a prefix: %s", ns.uri);
+ continue;
+ }
prefix_map.insert (ns.prefix, ns.uri);
}
@@ -415,6 +419,10 @@ public class Tracker.Sparql.Query : Object {
prefix_map.insert ("fn", FN_NS);
foreach (Namespace ns in Ontologies.get_namespaces ()) {
+ if (ns.prefix == null) {
+ critical ("Namespace does not specify a prefix: %s", ns.uri);
+ continue;
+ }
prefix_map.insert (ns.prefix, ns.uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]