music control - dont add another desklock handler if one is already

@fix
This commit is contained in:
Carsten Haitzler 2022-12-29 12:05:48 +00:00
parent 6cca3f77e8
commit 5a6fb2450c
1 changed files with 4 additions and 1 deletions

View File

@ -274,7 +274,10 @@ _cfg_data_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
inst->ctxt->config->pause_on_desklock = cfdata->pause_on_desklock;
if (inst->ctxt->config->pause_on_desklock)
desklock_handler = ecore_event_handler_add(E_EVENT_DESKLOCK, _desklock_cb, inst->ctxt);
{
if (!desklock_handler)
desklock_handler = ecore_event_handler_add(E_EVENT_DESKLOCK, _desklock_cb, inst->ctxt);
}
else
E_FREE_FUNC(desklock_handler, ecore_event_handler_del);