and handle NULL text params

SVN revision: 12914
This commit is contained in:
Carsten Haitzler 2005-01-12 02:58:17 +00:00
parent 33e8469d58
commit bbca4d6f18
1 changed files with 2 additions and 1 deletions

View File

@ -487,7 +487,8 @@ edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
(!strcmp(rp->text.text, text)))
return;
if (rp->text.text) free(rp->text.text);
rp->text.text = strdup(text);
if (text) rp->text.text = strdup(text);
else rp->text.text = NULL;
ed->dirty = 1;
_edje_recalc(ed);
if (ed->text_change.func) ed->text_change.func(ed->text_change.data, obj, part);