aboutsummaryrefslogtreecommitdiffstats
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
parenttests/eo: add explicit test case for setting an object as its own parent (diff)
downloadefl-259ba514ef40a5000b4db8d87a4e39d9c7eea7ff.tar.gz
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)
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
- efl_del(eo_e);
+ if (efl_parent_get(eo_e))
+ efl_del(eo_e);
+ else
+ efl_unref(eo_e);
}
typedef struct _Forced_Death Forced_Death;