Evas text: Add apparently important NULL checks.

Apparently obj->layer and obj->layer->evas can sometimes be NULL. It is
checked in other objects, for example, image object. Add the checks here
to "fix" a crash reported by Christopher Michael.
This commit is contained in:
Tom Hacohen 2013-03-26 11:09:41 +00:00
parent c3d8bcb56c
commit b7e8bb556d
1 changed files with 2 additions and 1 deletions

View File

@ -1917,7 +1917,8 @@ evas_object_text_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc);
if (o->cur.source) eina_stringshare_del(o->cur.source);
if (o->cur.text) free(o->cur.text);
if (o->font) evas_font_free(obj->layer->evas->evas, o->font);
if (o->font && obj->layer && obj->layer->evas)
evas_font_free(obj->layer->evas->evas, o->font);
#ifdef BIDI_SUPPORT
evas_bidi_paragraph_props_unref(o->bidi_par_props);
#endif