[tracker/subqueries] Fix crash
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/subqueries] Fix crash
- Date: Tue, 8 Dec 2009 09:09:30 +0000 (UTC)
commit fd985d8302b747118f413876dc22ae29d4125e70
Author: Jürg Billeter <j bitron ch>
Date: Mon Dec 7 19:05:05 2009 +0100
Fix crash
src/libtracker-data/tracker-data-manager.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 5eeabaa..26e7175 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -473,8 +473,8 @@ db_get_static_data (TrackerDBInterface *iface)
while (tracker_db_cursor_iter_next (cursor)) {
GValue value = { 0 };
- TrackerProperty *property, *secondary_index;
- const gchar *uri, *domain_uri, *range_uri;
+ TrackerProperty *property;
+ const gchar *uri, *domain_uri, *range_uri, *secondary_index_uri;
gboolean multi_valued, indexed, fulltext_indexed;
gboolean transient, annotation, is_inverse_functional_property;
gint id;
@@ -507,6 +507,8 @@ db_get_static_data (TrackerDBInterface *iface)
indexed = FALSE;
}
+ secondary_index_uri = tracker_db_cursor_get_string (cursor, 6);
+
tracker_db_cursor_get_value (cursor, 7, &value);
if (G_VALUE_TYPE (&value) != 0) {
@@ -553,7 +555,9 @@ db_get_static_data (TrackerDBInterface *iface)
tracker_property_set_range (property, tracker_ontology_get_class_by_uri (range_uri));
tracker_property_set_multiple_values (property, multi_valued);
tracker_property_set_indexed (property, indexed);
- tracker_property_set_secondary_index (property, tracker_ontology_get_property_by_uri (secondary_index));
+ if (secondary_index_uri) {
+ tracker_property_set_secondary_index (property, tracker_ontology_get_property_by_uri (secondary_index_uri));
+ }
tracker_property_set_fulltext_indexed (property, fulltext_indexed);
tracker_property_set_embedded (property, !annotation);
tracker_property_set_is_inverse_functional_property (property, is_inverse_functional_property);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]