[tracker/rss-enclosures] tracker-db-manager: Add NULL check when destroying thread/iface hashtable.
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] tracker-db-manager: Add NULL check when destroying thread/iface hashtable.
- Date: Mon, 3 May 2010 00:39:58 +0000 (UTC)
commit 2e0aadc74f651597d3f7d9553d39c964b8e21739
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Apr 16 16:18:30 2010 +0200
tracker-db-manager: Add NULL check when destroying thread/iface hashtable.
tracker_db_manager_init() may return early in some circumstances, not creating
the hashtable.
src/libtracker-db/tracker-db-manager.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index 9c008ba..a184887 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -939,8 +939,10 @@ tracker_db_manager_shutdown (void)
g_static_private_free (&interface_data_key);
- g_hash_table_destroy (thread_ifaces);
- thread_ifaces = NULL;
+ if (thread_ifaces) {
+ g_hash_table_destroy (thread_ifaces);
+ thread_ifaces = NULL;
+ }
/* Since we don't reference this enum anywhere, we do
* it here to make sure it exists when we call
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]