During a stress test of EFL a seemingly impossible crash happened, where
one of object's cow fields was NULL inside evas_object_was_visible.
Nothing in the code flow can possibly lead to this situation but
it still happened. For information, the object's delete_me flag was 2 in
evas_object_is_active() called from _evas_render_phase1_object_process().
So let's add a small safety check for crash prevention.
Differential Revision: https://phab.enlightenment.org/D4608
static inline int
evas_object_was_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
+ if (EINA_UNLIKELY(!obj->prev)) return EINA_FALSE;
if ((obj->prev->visible) && (!obj->no_render) &&
((obj->prev->cache.clip.visible) || obj->is_smart) &&
((obj->prev->cache.clip.a > 0 && obj->prev->render_op == EVAS_RENDER_BLEND)
static inline int
evas_object_is_visible(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
+ if (EINA_UNLIKELY(!obj->cur)) return EINA_FALSE;
if ((obj->cur->visible) && (!obj->no_render) &&
((obj->cur->cache.clip.visible) || (obj->is_smart)) &&
((obj->cur->cache.clip.a > 0 && obj->cur->render_op == EVAS_RENDER_BLEND)