forked from enlightenment/efl
elm_theme: Check the ref count to delete or unref.
Summary: In case of the ref count bigger than 1. That means the eo_theme ref count is 2. In that case we need to call efl_unref when theme freed. other case we can delete eo_theme. @fix Reviewers: Jaehyun_Cho, woohyun, Hermet Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8714
This commit is contained in:
parent
555ac0a452
commit
3cc9fc481c
|
@ -533,7 +533,10 @@ elm_theme_free(Elm_Theme *th)
|
|||
/* Destructs theme object and theme is deallocated in
|
||||
* _elm_theme_free_internal() in theme object desctructor.
|
||||
*/
|
||||
efl_unref(th->eo_theme);
|
||||
if (efl_ref_count(th->eo_theme) > 1)
|
||||
efl_unref(th->eo_theme);
|
||||
else
|
||||
efl_del(th->eo_theme);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue