summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-05 15:12:45 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-05 15:12:58 -0400
commit259ba514ef40a5000b4db8d87a4e39d9c7eea7ff (patch)
tree3affb41362b632fd7c60577e35fc6c726b2e7100
parent0f2a9e15cd940449ecb39954e278ab9e6a92c452 (diff)
evas/main: call correct destroy function in evas_free
Summary: an evas may or may not have a parent; this is legacy api and it's all confusing Reviewers: bu5hm4n, devilhorns Reviewed By: bu5hm4n Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6486
-rw-r--r--src/lib/evas/canvas/evas_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 6d3e560919..389c5ce6dd 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -280,7 +280,10 @@ evas_free(Evas *eo_e)
280 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); 280 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
281 return; 281 return;
282 MAGIC_CHECK_END(); 282 MAGIC_CHECK_END();
283 efl_del(eo_e); 283 if (efl_parent_get(eo_e))
284 efl_del(eo_e);
285 else
286 efl_unref(eo_e);
284} 287}
285 288
286typedef struct _Forced_Death Forced_Death; 289typedef struct _Forced_Death Forced_Death;