[vlc-devel] commit: Immunify libvlc_exception_clear() from NULL arguments. (JP Dinger )

git version control git at videolan.org
Thu Mar 5 16:49:48 CET 2009


vlc | branch: master | JP Dinger <jpd at m2x.nl> | Thu Mar  5 14:15:38 2009 +0100| [646beb8c34c26e0d8f79d0dd257ad00e24b51dbf] | committer: Rémi Denis-Courmont 

Immunify libvlc_exception_clear() from NULL arguments.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=646beb8c34c26e0d8f79d0dd257ad00e24b51dbf
---

 src/control/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/control/core.c b/src/control/core.c
index e52b3cb..90ae37c 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -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;




More information about the vlc-devel mailing list