[anjuta] Fix a crash when configure.ac contains LT_INIT two times



commit 0ccdf63a08fc502b58af96ca2bf91d0f4606591b
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sun Dec 29 18:10:17 2013 +0100

    Fix a crash when configure.ac contains LT_INIT two times

 plugins/am-project/am-project.c    |    1 +
 plugins/am-project/am-properties.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index e16d61d..97dd98a 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -739,6 +739,7 @@ amp_project_load_properties (AmpProject *project, AnjutaToken *macro, AnjutaToke
                        new_prop = anjuta_project_node_get_property (ANJUTA_PROJECT_NODE (project), 
info->base.id);
                        if ((new_prop != NULL) && (new_prop->info->default_value != new_prop))
                        {
+                               anjuta_project_node_remove_property (ANJUTA_PROJECT_NODE (project), new_prop);
                                amp_property_free (new_prop);
                        }
                        new_prop = amp_property_new (NULL, info->token_type, info->position, NULL, args);
diff --git a/plugins/am-project/am-properties.c b/plugins/am-project/am-properties.c
index 74b1452..00038e7 100644
--- a/plugins/am-project/am-properties.c
+++ b/plugins/am-project/am-properties.c
@@ -1342,7 +1342,7 @@ amp_node_property_add (AnjutaProjectNode *node, AnjutaProjectProperty *new_prop)
                                /* Replace property */
                                AnjutaProjectProperty *old_prop;
 
-                               old_prop = anjuta_project_node_get_map_property (node, info->base.id, 
new_prop->name);
+                               old_prop = anjuta_project_node_get_property (node, info->base.id);
                                if ((old_prop != NULL) && (old_prop->info->default_value != old_prop))
                                {
                                        anjuta_project_node_remove_property (node, old_prop);


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