eo: check return in efl_add before performing more operations

this fixes a crash on objects which fail to be created using efl_add_ref

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
This commit is contained in:
Cedric BAIL 2018-03-15 12:48:52 -04:00 committed by Cedric Bail
parent e1a53fe125
commit a5bb8bf3df
1 changed files with 1 additions and 1 deletions

View File

@ -1001,7 +1001,7 @@ _efl_add_end(Eo *eo_id, Eina_Bool is_ref, Eina_Bool is_fallback)
Eo *ret = efl_finalize(eo_id);
ret = _efl_add_internal_end(eo_id, ret);
if (is_ref)
if (ret && is_ref)
{
if (efl_parent_get(eo_id))
{