[tracker/rss-enclosures] SPARQL: Warn instead of crash on namespace without prefix
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] SPARQL: Warn instead of crash on namespace without prefix
- Date: Sat, 26 Jun 2010 23:15:05 +0000 (UTC)
commit 8d635b2dc779469b4e8996ecf57a603f67ecc593
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 9efb479..4eba6d5 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -385,6 +385,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);
}
@@ -446,6 +450,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]