Immunify libvlc_exception_clear() from NULL arguments.
authorJP Dinger <jpd@m2x.nl>
Thu, 5 Mar 2009 13:15:38 +0000 (14:15 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 5 Mar 2009 15:49:44 +0000 (17:49 +0200)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
src/control/core.c

index e52b3cb..90ae37c 100644 (file)
@@ -43,6 +43,8 @@ void libvlc_exception_init( libvlc_exception_t *p_exception )
 
 void libvlc_exception_clear( libvlc_exception_t *p_exception )
 {
+    if( NULL == p_exception )
+        return;
     if( p_exception->psz_message != nomemstr )
         free( p_exception->psz_message );
     p_exception->psz_message = NULL;