rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=988dd25bf9b265a605d0bec5ec5cefca9e5d467e

commit 988dd25bf9b265a605d0bec5ec5cefca9e5d467e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Feb 1 16:56:04 2016 +0200

    property: fix SEGFAULT after part rename from history
---
 src/bin/ui/group_navigator.c | 13 ++++---------
 src/bin/ui/property_group.c  |  3 ++-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/bin/ui/group_navigator.c b/src/bin/ui/group_navigator.c
index d11c878..f62c139 100644
--- a/src/bin/ui/group_navigator.c
+++ b/src/bin/ui/group_navigator.c
@@ -1798,22 +1798,17 @@ group_navigator_part_select(Evas_Object *obj, Part 
*part)
 void
 group_navigator_part_update(Evas_Object *obj, Part *part)
 {
-   Part *pr;
    Elm_Object_Item *part_item;
    Part_List *pl = evas_object_data_get(obj, GROUP_NAVIGATOR_DATA);
 
    assert(pl != NULL);
    assert(part != NULL);
 
-   part_item = elm_genlist_first_item_get(pl->genlist);
-   pr = elm_object_item_data_get(part_item);
-   while (pr != part)
+   if (elm_genlist_item_expanded_get(pl->parts_caption_item))
      {
-        part_item = elm_genlist_item_next_get(part_item);
-        pr = elm_object_item_data_get(part_item);
+        part_item = _part_item_find(pl, part);
+        assert(part_item != NULL);
 
-        assert(pr != NULL);
+        elm_genlist_item_update(part_item);
      }
-   assert(part_item != NULL);
-   elm_genlist_item_update(part_item);
 }
diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c
index 1b1d563..7f73c00 100644
--- a/src/bin/ui/property_group.c
+++ b/src/bin/ui/property_group.c
@@ -1458,7 +1458,8 @@ prop_part_name_update(Group_Prop_Data *pd)
    assert(pd != NULL);
 
    text = elm_entry_utf8_to_markup(pd->part->name);
-   if (strcmp(text, elm_entry_entry_get(pd->attributes.part.name)))
+   TODO("check that text is not NULL should be not needed after refactor");
+   if ((elm_entry_entry_get(pd->attributes.part.name) != NULL) && 
(strcmp(text, elm_entry_entry_get(pd->attributes.part.name))))
      elm_entry_entry_set(pd->attributes.part.name, pd->part->name);
    free(text);
 }

-- 


Reply via email to