music-control: do not crash if params is NULL

should not happen normally, but it might happen due to a buggy config
screen.
This commit is contained in:
Marcel Hollerbach 2020-09-02 15:06:13 +02:00
parent 703f42e099
commit 0e0cf36a32
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ _music_control(E_Object *obj EINA_UNUSED, const char *params)
{
E_Music_Control_Module_Context *ctxt = music_control_mod->data;
EINA_SAFETY_ON_NULL_RETURN(music_control_mod->data);
EINA_SAFETY_ON_NULL_RETURN(params);
if (!strcmp(params, "play"))
media_player2_player_play_pause_call(ctxt->mpris2_player);