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

Ludovic Fauvet git at videolan.org
Thu Jul 11 14:58:55 CEST 2013


vlc/vlc-2.1 | branch: master | Ludovic Fauvet <etix at videolan.org> | Thu Jul 11 14:38:45 2013 +0200| [8a0b8a6be2ef3481e44da52585a4ebcbc09de930] | committer: Jean-Baptiste Kempf

Qt: simple_prefs: fix crash when reading psz_aout

(cherry picked from commit ee6488a54ecef91c5de69f2839d599f7e20821bc)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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