]> git.sesse.net Git - vlc/commitdiff
fix a segfault (i didn't know strstr segfaulted when the haystak was NULL ...)
authorAntoine Cellerier <dionoea@videolan.org>
Mon, 9 May 2005 01:58:09 +0000 (01:58 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 9 May 2005 01:58:09 +0000 (01:58 +0000)
modules/gui/wxwindows/extrapanel.cpp

index 7b6a447295c5b41eb1c0c9a1e06437d10b2f355c..fbd1dbc2f8230293ee15fc008354fd18f03c386c 100644 (file)
@@ -546,7 +546,7 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
 
     aout_instance_t *p_aout= (aout_instance_t *)vlc_object_find(p_intf,
                                  VLC_OBJECT_AOUT, FIND_ANYWHERE);
-    char *psz_af;
+    char *psz_af = NULL;
     if( p_aout )
     {
         psz_af = var_GetString( p_aout, "audio-filter" );
@@ -559,7 +559,7 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
         if( config_GetInt( p_intf, "equalizer-2pass" ) )
             eq_2p_chkbox->SetValue( true );
     }
-    if( strstr( psz_af, "equalizer" ) != NULL )
+    if( psz_af != NULL ? strstr( psz_af, "equalizer" ) != NULL : VLC_FALSE )
     {
         eq_chkbox->SetValue( true );
     } else {