Commit e97c8b36 authored by Sébastien Escudier's avatar Sébastien Escudier Committed by Rémi Denis-Courmont

libvlc vlm init fix Don't test p_vlm twice if it wasn't NULL the first time...

libvlc vlm init fix Don't test p_vlm twice if it wasn't NULL the first time Don't add the callback if the creation failed
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 81a05711
......@@ -159,15 +159,16 @@ static int libvlc_vlm_init( libvlc_instance_t *p_instance,
if( !p_instance->p_vlm )
{
p_instance->p_vlm = vlm_New( p_instance->p_libvlc_int );
if( !p_instance->p_vlm )
{
libvlc_exception_raise( p_exception,
"Unable to create VLM." );
return VLC_EGENERIC;
}
var_AddCallback( (vlc_object_t *)p_instance->p_vlm, "intf-event", VlmEvent,
p_instance->p_event_manager );
}
if( !p_instance->p_vlm )
{
libvlc_exception_raise( p_exception,
"Unable to create VLM." );
return VLC_EGENERIC;
}
return VLC_SUCCESS;
}
#define VLM_RET(p,ret) do { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment