From 447b4ce778fda04f22a94bef801c43d43a3e2d43 Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Mon, 9 May 2005 01:58:09 +0000 Subject: [PATCH] fix a segfault (i didn't know strstr segfaulted when the haystak was NULL ...) --- modules/gui/wxwindows/extrapanel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gui/wxwindows/extrapanel.cpp b/modules/gui/wxwindows/extrapanel.cpp index 7b6a447295..fbd1dbc2f8 100644 --- a/modules/gui/wxwindows/extrapanel.cpp +++ b/modules/gui/wxwindows/extrapanel.cpp @@ -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 { -- 2.39.2