OSDN Git Service

core: Fix g_hash_table_destroy when running without -E
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 21 Mar 2014 14:14:52 +0000 (16:14 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 21 Mar 2014 14:15:58 +0000 (16:15 +0200)
src/gatt-dbus.c

index 275b263..6c4cdf7 100644 (file)
@@ -341,6 +341,12 @@ gboolean gatt_dbus_manager_register(void)
 
 void gatt_dbus_manager_unregister(void)
 {
+       /* We might not have initialized if experimental features are
+        * not enabled.
+        */
+       if (!proxy_hash)
+               return;
+
        g_hash_table_destroy(proxy_hash);
        proxy_hash = NULL;