diff options
author | Jean Guyomarc'h <jean.guyomarch@gmail.com> | 2016-01-05 11:49:47 -0800 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2016-01-05 11:50:03 -0800 |
commit | 194fa996f448685b6a3977b530bd07b2fbf2e6af (patch) | |
tree | 9325e9d8d50341dc66f2f43bc6031ad8354ded2e | |
parent | f761a440adc9d9a83f2fc59a73f376cc9732fe20 (diff) | |
download | elementary-194fa996f448685b6a3977b530bd07b2fbf2e6af.tar.gz |
sys_notify: fix shutdown of elm_sys_notify
Summary:
When elm_sys_notify was not needed, its singleton instance
is NULL. Eo complained about passing a NULL pointer.
Thanks to bu5hm4n (Marcel Hollerbach) for the report.
@fix
Reviewers: stefan_schmidt, cedric
Subscribers: bu5hm4n
Differential Revision: https://phab.enlightenment.org/D3535
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r-- | src/lib/elm_sys_notify.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/elm_sys_notify.c b/src/lib/elm_sys_notify.c index 87536b806..958dd0996 100644 --- a/src/lib/elm_sys_notify.c +++ b/src/lib/elm_sys_notify.c @@ -225,9 +225,13 @@ _elm_sys_notify_class_constructor(Eo_Class *klass EINA_UNUSED) void _elm_unneed_sys_notify(void) { - eo_do(_singleton, - elm_obj_sys_notify_servers_set(ELM_SYS_NOTIFY_SERVER_NONE)); - eo_del(_singleton); + Elm_Sys_Notify *manager = elm_sys_notify_singleton_get(); + if (manager) + { + eo_do(manager, + elm_obj_sys_notify_servers_set(ELM_SYS_NOTIFY_SERVER_NONE)); + eo_del(manager); + } } EAPI Eina_Bool |