inline int libvlc_exception_raised( libvlc_exception_t *p_exception )
{
- return p_exception->b_raised;
+ return (NULL != p_exception) && p_exception->b_raised;
}
inline char* libvlc_exception_get_message( libvlc_exception_t *p_exception )
libvlc_exception_t *p_e )
{
vout_thread_t *p_vout = GetVout( p_input, p_e );
- if ( libvlc_exception_raised( p_e ) )
+ if ( NULL == p_vout )
{
- if ( strcmp( "No active video output", libvlc_exception_get_message( p_e ) ) == 0 )
+ if ( libvlc_exception_raised( p_e )
+ && strcmp( "No active video output", libvlc_exception_get_message( p_e ) ) == 0 )
{
libvlc_exception_clear( p_e );
}