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
This commit is contained in:
Mike Blumenkrantz 2018-07-05 15:12:45 -04:00
parent 0f2a9e15cd
commit 259ba514ef
1 changed files with 4 additions and 1 deletions

View File

@ -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;