[tracker] TrackerFileSystem: Fix warning when registering a property twice



commit 187dfd467fa0e9611cdf116990f1eb2a3e8dbc3a
Author: Xavier Claessens <xavier claessens collabora co uk>
Date:   Wed Dec 11 18:10:38 2013 -0500

    TrackerFileSystem: Fix warning when registering a property twice
    
    Use g_hash_table_contains() instead of _lookup() for the case
    where the destroy function is NULL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719802

 src/libtracker-miner/tracker-file-system.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-system.c b/src/libtracker-miner/tracker-file-system.c
index fecdc05..979df5a 100644
--- a/src/libtracker-miner/tracker-file-system.c
+++ b/src/libtracker-miner/tracker-file-system.c
@@ -669,7 +669,7 @@ tracker_file_system_register_property (GQuark             prop,
                properties = g_hash_table_new (NULL, NULL);
        }
 
-       if (g_hash_table_lookup (properties, GUINT_TO_POINTER (prop))) {
+       if (g_hash_table_contains (properties, GUINT_TO_POINTER (prop))) {
                g_warning ("FileSystem: property '%s' has been already registered",
                           g_quark_to_string (prop));
                return;


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