Commit 2f84be55 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix association crash on XP

Close #2246 #4424 #7431 #5377
(cherry picked from commit f447119e42aa353b18f8ba96ff6a52af363f8a3e)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent feea6387
...@@ -1062,10 +1062,10 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext ) ...@@ -1062,10 +1062,10 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
void delAsso( 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, "", "" ); 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 ); free( psz_value );
psz_value = qvReg->ReadRegistryString( psz_ext, "VLC.backup", "" ); psz_value = qvReg->ReadRegistryString( psz_ext, "VLC.backup", "" );
...@@ -1076,6 +1076,7 @@ void delAsso( QVLCRegistry *qvReg, const char *psz_ext ) ...@@ -1076,6 +1076,7 @@ void delAsso( QVLCRegistry *qvReg, const char *psz_ext )
} }
free( psz_value ); free( psz_value );
} }
void SPrefsPanel::saveAsso() void SPrefsPanel::saveAsso()
{ {
QVLCRegistry * qvReg = NULL; QVLCRegistry * qvReg = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment