tasn pushed a commit to branch master.
commit b7e8bb556d7966e5fda7b72869facf51189130e8
Author: Tom Hacohen <[email protected]>
Date: Tue Mar 26 11:09:41 2013 +0000
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.
---
src/lib/evas/canvas/evas_object_text.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/evas/canvas/evas_object_text.c
b/src/lib/evas/canvas/evas_object_text.c
index 2d5722a..78c25ee 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -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
--
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d