[anjuta/newproject] am: Fix a crash for module nodes



commit 7a0175ce25d2d928b1aec18f97113e5a9512a09e
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Mon Oct 25 21:57:21 2010 +0200

    am: Fix a crash for module nodes

 plugins/am-project/am-project.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index c821e59..4e4b529 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -2278,17 +2278,19 @@ iproject_load_node (IAnjutaProject *obj, AnjutaProjectNode *node, GError **error
 {
 	AnjutaProjectNode *new_node;
 	AnjutaProjectNode *proxy;
+	AnjutaProjectNode *parent;
 	GHashTable *map;
 	GError *err = NULL;
 	
 	if (node == NULL) node = AMP_PROJECT (obj)->root;
 
+	parent = anjuta_project_node_parent (node);
 	proxy = amp_project_duplicate_node (node);
 	
 	new_node = amp_project_load_node (AMP_PROJECT (obj), proxy, &err);
 	map = amp_project_map_node (node, new_node);
 	g_hash_table_foreach (map, (GHFunc)amp_project_replace_node, map);
-	node->parent = new_node->parent;
+	node->parent = parent;
 	proxy->parent = NULL;
 	g_hash_table_destroy (map);
 	g_object_unref (proxy);



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