forked from enlightenment/enlightenment
e mixer - fix segv on desklock if default sink not set yet
This commit is contained in:
parent
5d7fa51309
commit
dd6e4f33f8
|
@ -703,14 +703,20 @@ _desklock_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *info)
|
||||||
|
|
||||||
if (ev->on)
|
if (ev->on)
|
||||||
{
|
{
|
||||||
_was_mute = mixer_context->sink_default->mute;
|
if (mixer_context->sink_default)
|
||||||
if (!_was_mute)
|
{
|
||||||
emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_TRUE);
|
_was_mute = mixer_context->sink_default->mute;
|
||||||
|
if (!_was_mute)
|
||||||
|
emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!_was_mute)
|
if (mixer_context->sink_default)
|
||||||
emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_FALSE);
|
{
|
||||||
|
if (!_was_mute)
|
||||||
|
emix_sink_mute_set((Emix_Sink *)mixer_context->sink_default, EINA_FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
|
Loading…
Reference in New Issue