[anjuta] symbol-db: Remove critical warnings



commit 8580b6d409ed25443d440e7bf39572a562bfb8aa
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sat Mar 6 22:30:45 2010 +0100

    symbol-db: Remove critical warnings

 plugins/symbol-db/symbol-db-view-locals.c |    7 +++----
 plugins/symbol-db/symbol-db-view.c        |    3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-view-locals.c b/plugins/symbol-db/symbol-db-view-locals.c
index eef2387..69b0d06 100644
--- a/plugins/symbol-db/symbol-db-view-locals.c
+++ b/plugins/symbol-db/symbol-db-view-locals.c
@@ -699,9 +699,8 @@ add_new_waiting_for (SymbolDBViewLocals *dbvl, gint parent_symbol_id,
 	{
 		/* no lists already set. Create one. */
 		GSList *slist;					
-		slist = g_slist_alloc ();			
 				
-		slist = g_slist_prepend (slist, wfs);
+		slist = g_slist_prepend ((GSList *)NULL, wfs);
 					
 		/*DEBUG_PRINT ("add_new_waiting_for (): NEW adding to "
 					 "waiting_for [%d]", parent_symbol_id);*/
@@ -1131,7 +1130,7 @@ on_symbol_removed (SymbolDBEngine *dbe, gint symbol_id, gpointer data)
 	g_return_if_fail (dbvl != NULL);
 	priv = dbvl->priv;
 
-	if (priv->display_nothing)
+	if (priv->display_nothing || (priv->nodes_displayed == NULL))
 	{
 		return;
 	}
@@ -1163,7 +1162,7 @@ on_symbol_scope_updated (SymbolDBEngine *dbe, gint symbol_id, gpointer data)
 	g_return_if_fail (dbvl != NULL);
 	priv = dbvl->priv;
 
-	if (priv->display_nothing)
+	if (priv->display_nothing || (priv->nodes_displayed == NULL))
 	{
 		return;
 	}
diff --git a/plugins/symbol-db/symbol-db-view.c b/plugins/symbol-db/symbol-db-view.c
index f8f9785..4ac5acd 100644
--- a/plugins/symbol-db/symbol-db-view.c
+++ b/plugins/symbol-db/symbol-db-view.c
@@ -375,9 +375,8 @@ add_new_waiting_for (SymbolDBView *dbv, gint parent_symbol_id,
 	{
 		/* no lists already set. Create one. */
 		GSList *slist;					
-		slist = g_slist_alloc ();			
 				
-		slist = g_slist_prepend (slist, wfs);
+		slist = g_slist_prepend ((GSList *)NULL, wfs);
 
 		/* add it to the binary tree. */
 		g_tree_insert (priv->waiting_for, GINT_TO_POINTER (parent_symbol_id), 



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