Commit 2cee8e42 authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

Qt: Simple prefs/input: fix variable handling

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3cb1603b
...@@ -719,13 +719,14 @@ void SPrefsPanel::apply() ...@@ -719,13 +719,14 @@ void SPrefsPanel::apply()
case SPrefsInputAndCodecs: case SPrefsInputAndCodecs:
{ {
/* Device default selection */ /* Device default selection */
const char *psz_devicepath = char *psz_devicepath =
qtu( qobject_cast<QLineEdit *>(optionWidgets[inputLE] )->text() ); strdup( qtu( qobject_cast<QLineEdit *>(optionWidgets[inputLE] )->text() ) );
if( !EMPTY_STR( psz_devicepath ) ) if( !EMPTY_STR( psz_devicepath ) )
{ {
config_PutPsz( p_intf, "dvd", psz_devicepath ); config_PutPsz( p_intf, "dvd", psz_devicepath );
config_PutPsz( p_intf, "vcd", psz_devicepath ); config_PutPsz( p_intf, "vcd", psz_devicepath );
config_PutPsz( p_intf, "cd-audio", 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 ) #define CaCi( name, int ) config_PutInt( p_intf, name, int * i_comboValue )
......
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