summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKateryna Fesyna <k.fesyna@samsung.com>2014-11-06 06:04:39 +0100
committerCedric BAIL <cedric@osg.samsung.com>2014-11-06 06:04:43 +0100
commit41ea6e81d6aa74d5cb93122899ba7da2d25309fb (patch)
treebf5d49f78f1efd2651b79ea04dbf1abbe2844300
parent4dd2b8921349a45be096d583be1dd4837f87a930 (diff)
edje: Edje_Edit - fix segfaults on restacking of text parts with set 'text_source'.
Summary: This commit fixes segfault on restacking text parts with set 'text_source' that is caused by wrong updaiting of 'text_source' IDs on restacking of parts due to typo. @fix Reviewers: Hermet, seoz, raster, cedric Reviewed By: cedric Subscribers: cedric, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D1646 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/edje/edje_edit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index bd908d75d4..b7247acd3b 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -645,13 +645,12 @@ _edje_part_description_id_switch(int type, Edje_Part_Description_Common *c, int
645 || type == EDJE_PART_TYPE_TEXTBLOCK) 645 || type == EDJE_PART_TYPE_TEXTBLOCK)
646 { 646 {
647 Edje_Part_Description_Text *t; 647 Edje_Part_Description_Text *t;
648
649 t = (Edje_Part_Description_Text *) c; 648 t = (Edje_Part_Description_Text *) c;
650 649
651 if (t->text.id_source == id1) t->text.id_source = id2; 650 if (t->text.id_source == id1) t->text.id_source = id2;
652 else if (t->text.id_source == id2) t->text.id_source = id1; 651 else if (t->text.id_source == id2) t->text.id_source = id1;
653 if (t->text.id_text_source == id1) t->text.id_text_source = id2; 652 if (t->text.id_text_source == id1) t->text.id_text_source = id2;
654 else if (t->text.id_text_source == id2) t->text.id_text_source = id2; 653 else if (t->text.id_text_source == id2) t->text.id_text_source = id1;
655 } 654 }
656} 655}
657 656
@@ -6528,7 +6527,7 @@ edje_edit_state_text_set(Evas_Object *obj, const char *part, const char *state,
6528 (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)) && 6527 (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)) &&
6529 (real->typedata.text) && (real->typedata.text->text_source == rp)) 6528 (real->typedata.text) && (real->typedata.text->text_source == rp))
6530 { 6529 {
6531 txt = (Edje_Part_Description_Text *) real; 6530 txt = _edje_real_part_text_text_source_description_get(real, NULL);
6532 _edje_if_string_free(ed, txt->text.text.str); 6531 _edje_if_string_free(ed, txt->text.text.str);
6533 txt->text.text.str = (char *)eina_stringshare_add(text); 6532 txt->text.text.str = (char *)eina_stringshare_add(text);
6534 txt->text.text.id = 0; 6533 txt->text.text.id = 0;