edje_edit: Check return of _edje_part_description_find_byname

If this retruns NULL we would do a NULL deref some lines below. Better check.

CID 1222458 1222457
This commit is contained in:
Stefan Schmidt 2014-09-04 15:09:17 +02:00
parent ffd1031d2b
commit debb51e5df
1 changed files with 2 additions and 0 deletions

View File

@ -6857,6 +6857,7 @@ edje_edit_state_text_text_source_set(Evas_Object *obj, const char *part, const c
if (source)
{
spd = _edje_part_description_find_byname(eed, source, state, value);
if (!spd) return EINA_FALSE;
txt = (Edje_Part_Description_Text *) pd;
source_txt = (Edje_Part_Description_Text *) spd;
@ -6916,6 +6917,7 @@ edje_edit_state_text_source_set(Evas_Object *obj, const char *part, const char *
if (source)
{
spd = _edje_part_description_find_byname(eed, source, state, value);
if (!spd) return EINA_FALSE;
txt = (Edje_Part_Description_Text *) pd;
source_style = (Edje_Part_Description_Text *) spd;