[vlc-commits] Qt: simple_prefs: fix crash when reading psz_aout

Ludovic Fauvet git at videolan.org
Thu Jul 11 14:47:29 CEST 2013


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Thu Jul 11 14:38:45 2013 +0200| [ee6488a54ecef91c5de69f2839d599f7e20821bc] | committer: Ludovic Fauvet

Qt: simple_prefs: fix crash when reading psz_aout

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

 modules/gui/qt4/components/simple_preferences.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 9b08b18..e643bef 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -342,7 +342,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             int i_volume = 100; //FIXME not foolproof
 
 #define get_vol_aout( name ) \
-            module_exists( name ) && ( !strcmp( psz_aout, name ) || !strcmp( psz_aout, "any" ) )
+            module_exists( name ) && ( !psz_aout || !strcmp( psz_aout, name ) || !strcmp( psz_aout, "any" ) )
 
 #if defined( _WIN32 )
             if( get_vol_aout( "directx" ) )
@@ -909,7 +909,7 @@ void SPrefsPanel::apply()
         float f_gain = powf( i_volume / 100.f, 3 );
 
 #define save_vol_aout( name ) \
-            module_exists( name ) && ( !strcmp( psz_aout, name ) || !strcmp( psz_aout, "any" ) )
+            module_exists( name ) && ( !psz_aout || !strcmp( psz_aout, name ) || !strcmp( psz_aout, "any" ) )
 
         //FIXME this is moot
 #if defined( _WIN32 )



More information about the vlc-commits mailing list