[anjuta/sdb-core-trans] symbol-db: added assertion to avoid crash on null hashtable.



commit cc3380cd1bf707ba98a8ad73b9471677d5759282
Author: Massimo Corà <mcora src gnome org>
Date:   Sat Aug 14 17:30:30 2010 +0200

    symbol-db: added assertion to avoid crash on null hashtable.

 plugins/symbol-db/plugin.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index 44ba4b4..1b359a7 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -1462,6 +1462,8 @@ save_session_packages (SymbolDBPlugin *sdb_plugin)
 
 	pkg_list = NULL;
 
+	g_return_val_if_fail (sdb_plugin->session_packages != NULL, NULL);
+	
 	g_hash_table_iter_init (&iter, sdb_plugin->session_packages);
 	while (g_hash_table_iter_next (&iter, &key, &versions)) 
   	{



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