From a5bb8bf3df49988652f0d07b6b36e671977f6c0b Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 15 Mar 2018 12:48:52 -0400 Subject: [PATCH] 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 --- 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)) {