[anjuta] am-project: Make things a bit more robust



commit 7cf31c2582f3bc4dffdc8e7606aaabbdbc9c5cbd
Author: Johannes Schmid <jhs gnome org>
Date:   Fri Dec 3 18:50:06 2010 +0100

    am-project: Make things a bit more robust

 plugins/am-project/am-node.c    |    2 ++
 plugins/am-project/am-project.c |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/am-project/am-node.c b/plugins/am-project/am-node.c
index 4ccb4bd..eba4da1 100644
--- a/plugins/am-project/am-node.c
+++ b/plugins/am-project/am-node.c
@@ -334,6 +334,8 @@ amp_package_add_token (AnjutaAmPackageNode *node, AnjutaToken *token)
 void
 amp_package_update_node (AnjutaAmPackageNode *node, AnjutaAmPackageNode *new_node)
 {
+	g_return_if_fail (new_node != NULL);	
+
 	node->token = new_node->token;
 	g_free (node->version);
 	node->version = new_node->version;
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index f237ef7..2902551 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -1728,7 +1728,7 @@ amp_project_update_node (AnjutaProjectNode *key, AnjutaProjectNode *value, GHash
 		AnjutaProjectNode *node = value;	/* The node that we keep in the tree */
 		AnjutaProjectNode *new_node = key;  /* The node with the new data */
 		
-		if (new_node != node)
+		if (new_node && new_node != node)
 		{
 			GList *properties;
 		
@@ -2484,6 +2484,8 @@ amp_load_complete (PmJob *job)
 {
 	GHashTable *map;
 
+	g_return_if_fail (job->proxy != NULL);
+
 	//anjuta_project_node_check (job->node);
 	map = amp_project_map_node (job->node, job->proxy);
 	g_object_ref (job->proxy);



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