summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-05 11:49:47 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-05 11:50:03 -0800
commit194fa996f448685b6a3977b530bd07b2fbf2e6af (patch)
tree9325e9d8d50341dc66f2f43bc6031ad8354ded2e
parentf761a440adc9d9a83f2fc59a73f376cc9732fe20 (diff)
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.c10
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)
225void 225void
226_elm_unneed_sys_notify(void) 226_elm_unneed_sys_notify(void)
227{ 227{
228 eo_do(_singleton, 228 Elm_Sys_Notify *manager = elm_sys_notify_singleton_get();
229 elm_obj_sys_notify_servers_set(ELM_SYS_NOTIFY_SERVER_NONE)); 229 if (manager)
230 eo_del(_singleton); 230 {
231 eo_do(manager,
232 elm_obj_sys_notify_servers_set(ELM_SYS_NOTIFY_SERVER_NONE));
233 eo_del(manager);
234 }
231} 235}
232 236
233EAPI Eina_Bool 237EAPI Eina_Bool