X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcontrol%2Fmediacontrol_core.c;h=f721ec874549ad1300355c2ad8c0bb82af5c9921;hb=09020b63ba7513eeaff38f1cc40e2b4937c61030;hp=7ab5e8f557439f08fa137c64272d45a35b81ec82;hpb=0851b345b93451a2cd0c61f12680b055fbfef027;p=vlc diff --git a/src/control/mediacontrol_core.c b/src/control/mediacontrol_core.c index 7ab5e8f557..f721ec8745 100644 --- a/src/control/mediacontrol_core.c +++ b/src/control/mediacontrol_core.c @@ -51,17 +51,15 @@ mediacontrol_Instance* mediacontrol_new( int argc, char** argv, mediacontrol_Exception *exception ) { mediacontrol_Instance* retval; - libvlc_exception_t ex; - - libvlc_exception_init( &ex ); mediacontrol_exception_init( exception ); retval = ( mediacontrol_Instance* )malloc( sizeof( mediacontrol_Instance ) ); if( !retval ) RAISE_NULL( mediacontrol_InternalException, "Out of memory" ); - retval->p_instance = libvlc_new( argc, (const char**)argv, &ex ); - HANDLE_LIBVLC_EXCEPTION_NULL( &ex ); + retval->p_instance = libvlc_new( argc, (const char**)argv ); + if( !retval->p_instance ) + RAISE_NULL( mediacontrol_InternalException, "Out of memory" ); retval->p_media_player = libvlc_media_player_new( retval->p_instance ); if( !retval->p_media_player ) RAISE_NULL( mediacontrol_InternalException, "Out of memory" );