From: Francois Cartegnie Date: Thu, 1 Oct 2009 16:12:14 +0000 (+0200) Subject: Qt: Simple prefs/input: fix variable handling X-Git-Tag: 1.1.0-ff~3044 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2cee8e42859d99895603f5617ce7dee6c3beaa93;p=vlc Qt: Simple prefs/input: fix variable handling Signed-off-by: Jean-Baptiste Kempf --- diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index c1ecda9672..6f98fe25a0 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -719,13 +719,14 @@ void SPrefsPanel::apply() case SPrefsInputAndCodecs: { /* Device default selection */ - const char *psz_devicepath = - qtu( qobject_cast(optionWidgets[inputLE] )->text() ); + char *psz_devicepath = + strdup( qtu( qobject_cast(optionWidgets[inputLE] )->text() ) ); if( !EMPTY_STR( psz_devicepath ) ) { config_PutPsz( p_intf, "dvd", psz_devicepath ); config_PutPsz( p_intf, "vcd", psz_devicepath ); config_PutPsz( p_intf, "cd-audio", psz_devicepath ); + free( psz_devicepath ); } #define CaCi( name, int ) config_PutInt( p_intf, name, int * i_comboValue )