]> git.sesse.net Git - vlc/commitdiff
Fix crash when (access_t*)->pf_control is NULL
authorRafaël Carré <funman@videolan.org>
Wed, 12 Mar 2008 23:05:27 +0000 (00:05 +0100)
committerRafaël Carré <funman@videolan.org>
Wed, 12 Mar 2008 23:17:25 +0000 (00:17 +0100)
This was triggered by DBus module using access2_Control

include/vlc_access.h

index 1fbc2484b1c61afa54982fac9a564673b2e97dba..4435f068d549ee5356fed362b18dacbabb6eb5f1 100644 (file)
@@ -119,7 +119,7 @@ struct access_t
 
 static inline int access2_vaControl( access_t *p_access, int i_query, va_list args )
 {
-    if( !p_access ) return VLC_EGENERIC;
+    if( !p_access || !p_access->pf_control ) return VLC_EGENERIC;
     return p_access->pf_control( p_access, i_query, args );
 }