char *psz_datadir = config_GetUserDir( VLC_DATA_DIR );
char * psz_uri;
- if( !psz_datadir ) /* XXX: i doubt that this can ever happen */
- {
- libvlc_exception_raise( p_e, "Can't get data directory" );
- return;
- }
-
- if( asprintf( &psz_uri, "file/xspf-open://%s" DIR_SEP "ml.xsp",
+ if( psz_datadir == NULL
+ || asprintf( &psz_uri, "file/xspf-open://%s" DIR_SEP "ml.xsp",
psz_datadir ) == -1 )
+ psz_uri = NULL;
+ free( psz_datadir );
+
+ if( psz_uri == NULL )
{
- free( psz_datadir );
- libvlc_exception_raise( p_e, "Can't get create the path" );
+ libvlc_exception_raise( p_e );
+ libvlc_printerr( "Not enough memory" );
return;
}
- free( psz_datadir );
+
if( p_mlib->p_mlist )
libvlc_media_list_release( p_mlib->p_mlist );
libvlc_exception_t * p_e )
{
(void)p_mlib;
- libvlc_exception_raise( p_e, "Not supported" );
+ libvlc_exception_raise( p_e );
+ libvlc_printerr( "Function not implemented" );
}
/**************************************************************************