diff options
author | Woochanlee <wc0917.lee@samsung.com> | 2019-04-25 21:24:42 +0900 |
---|---|---|
committer | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2019-04-25 21:24:42 +0900 |
commit | 3cc9fc481caaae5fa941bff2f43d5f0f5d0bdb25 (patch) | |
tree | 859f7a3605a355d9509cdae3e1cc6c6d244dd981 | |
parent | 555ac0a452c3986b77deefcf791e9919e00f5e6b (diff) | |
download | efl-3cc9fc481caaae5fa941bff2f43d5f0f5d0bdb25.tar.gz |
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
-rw-r--r-- | src/lib/elementary/elm_theme.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 538b6fa8e4..62397d1c09 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -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 |