cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a5bb8bf3df49988652f0d07b6b36e671977f6c0b

commit a5bb8bf3df49988652f0d07b6b36e671977f6c0b
Author: Cedric BAIL <[email protected]>
Date:   Thu Mar 15 12:48:52 2018 -0400

    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 <[email protected]>
---
 src/lib/eo/eo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index dfb23e2934..4e6b0912e9 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -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))
           {

-- 


Reply via email to