From: Carsten Haitzler Date: Tue, 7 Aug 2012 11:15:30 +0000 (+0000) Subject: 2 bugs. X-Git-Tag: submit/devel/efl/20131022.203902~4718 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb0d1a4f573f9690ed20c0b7c186da2292ee4a23;p=platform%2Fupstream%2Fefl.git 2 bugs. 1 textclasses were repeated per object list and (segv free same tc 2x) 2. we returend if size OR font name match - BOTH have to match to be "the same". so && not || SVN revision: 74980 --- diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 8fab256..d207eca 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -919,9 +919,9 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char if ((tc->name) && (!strcmp(tc->name, text_class))) { /* Match and the same, return */ - if ((tc->size == size) || - (tc->font == font) || - (tc->font && font && !strcmp(tc->font, font))) + if ((tc->size == size) && + ((tc->font == font) || + (tc->font && font && !strcmp(tc->font, font)))) return EINA_TRUE; /* Update new text class properties */ @@ -944,6 +944,8 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char } tc->font = eina_stringshare_add(font); tc->size = size; + /* Add to edje's text class list */ + ed->text_classes = eina_list_append(ed->text_classes, tc); } for (i = 0; i < ed->table_parts_size; i++) @@ -956,8 +958,6 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char font, size); } - /* Add to edje's text class list */ - ed->text_classes = eina_list_append(ed->text_classes, tc); ed->dirty = 1; ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE