[vlc-commits] Qt: fix association crash on XP

Jean-Baptiste Kempf git at videolan.org
Sun Sep 16 20:14:36 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Sep 16 20:11:05 2012 +0200| [2f84be55d7989cd6fceb13475aba7f2095e991b9] | committer: Jean-Baptiste Kempf

Qt: fix association crash on XP

Close #2246 #4424 #7431 #5377
(cherry picked from commit f447119e42aa353b18f8ba96ff6a52af363f8a3e)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 2af9138..dd96d38 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1062,10 +1062,10 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
 
 void delAsso( QVLCRegistry *qvReg, const char *psz_ext )
 {
-    char psz_VLC[] = "VLC";
+    QString s_path( "VLC"); s_path += psz_ext;
     char *psz_value = qvReg->ReadRegistryString( psz_ext, "", "" );
 
-    if( psz_value && !strcmp( strcat( psz_VLC, psz_ext ), psz_value ) )
+    if( psz_value && !strcmp( qtu(s_path), psz_value ) )
     {
         free( psz_value );
         psz_value = qvReg->ReadRegistryString( psz_ext, "VLC.backup", "" );
@@ -1076,6 +1076,7 @@ void delAsso( QVLCRegistry *qvReg, const char *psz_ext )
     }
     free( psz_value );
 }
+
 void SPrefsPanel::saveAsso()
 {
     QVLCRegistry * qvReg = NULL;



More information about the vlc-commits mailing list