Commit 5e9ad3ec authored by Sam Thursfield's avatar Sam Thursfield

Fix crash in read-only mode when ontologies.gdvb is missing

We shouldn't unref the manager->ontologies object if loading the
new ontologies failed. Fixes a crash in the fallback code path.
parent ca0bb0d4
......@@ -3954,6 +3954,7 @@ static void
load_ontologies_gvdb (TrackerDataManager *manager,
GError **error)
TrackerOntologies *ontologies;
gchar *filename;
GFile *child;
......@@ -3961,8 +3962,12 @@ load_ontologies_gvdb (TrackerDataManager *manager,
filename = g_file_get_path (child);
g_object_unref (child);
g_object_unref (manager->ontologies);
manager->ontologies = tracker_ontologies_load_gvdb (filename, error);
ontologies = tracker_ontologies_load_gvdb (filename, error);
if (ontologies != NULL) {
g_object_unref (manager->ontologies);
manager->ontologies = ontologies;
g_free (filename);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment