From dd6e4f33f83fa30d34d0ea737769300b6f1e3f0a Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 9 Jun 2015 16:18:24 +0900 Subject: [PATCH] e mixer - fix segv on desklock if default sink not set yet --- src/modules/mixer/e_mod_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c index 5361ec7..b89cd58 100644 --- a/src/modules/mixer/e_mod_main.c +++ b/src/modules/mixer/e_mod_main.c @@ -703,14 +703,20 @@ _desklock_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *info) if (ev->on) { - _was_mute = mixer_context->sink_default->mute; - if (!_was_mute) - emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_TRUE); + if (mixer_context->sink_default) + { + _was_mute = mixer_context->sink_default->mute; + if (!_was_mute) + emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_TRUE); + } } else { - if (!_was_mute) - emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_FALSE); + if (mixer_context->sink_default) + { + if (!_was_mute) + emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_FALSE); + } } return ECORE_CALLBACK_PASS_ON; -- 2.7.4