[tracker/wip/carlosg/domain-ontologies] libtracker-data: Ensure we set user data on an existing connection



commit 73c62d12627b16217ff4cce6acb301d4f76cfd07
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 21 18:25:05 2017 +0200

    libtracker-data: Ensure we set user data on an existing connection

 src/libtracker-data/tracker-db-manager.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 4604b4c..be9cda7 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -985,15 +985,15 @@ tracker_db_manager_create_db_interface (TrackerDBManager  *db_manager,
        connection = tracker_db_interface_sqlite_new (db_manager->db.abs_filename,
                                                      flags,
                                                      &internal_error);
-       tracker_db_interface_set_user_data (connection,
-                                           g_weak_ref_get (&db_manager->iface_data),
-                                           g_object_unref);
-
        if (internal_error) {
                g_propagate_error (error, internal_error);
                return NULL;
        }
 
+       tracker_db_interface_set_user_data (connection,
+                                           g_weak_ref_get (&db_manager->iface_data),
+                                           g_object_unref);
+
        db_set_params (connection,
                       db_manager->db.cache_size,
                       db_manager->db.page_size,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]