- /* does caller care about exceptions ? */
- if( p_exception == NULL ) return;
-
- /* remove previous exception if it wasn't cleared */
- libvlc_exception_clear( p_exception );
-
- va_start( args, psz_format );
- if( vasprintf( &p_exception->psz_message, psz_format, args ) == -1)
- p_exception->psz_message = (char *)nomemstr;
- va_end( args );
-
- p_exception->b_raised = 1;
+ vlc_mutex_lock( &p_instance->instance_lock );
+ p_instance->ref_count++;
+ vlc_mutex_unlock( &p_instance->instance_lock );