Commit f39ed931 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: fix racy access to configuration

parent 84ec0168
...@@ -1098,9 +1098,7 @@ void SPrefsPanel::apply() ...@@ -1098,9 +1098,7 @@ void SPrefsPanel::apply()
qobject_cast<QSlider *>(optionWidgets["defaultVolume"])->value(); qobject_cast<QSlider *>(optionWidgets["defaultVolume"])->value();
bool b_reset_volume = bool b_reset_volume =
qobject_cast<QCheckBox *>(optionWidgets["resetVolumeCheckbox"])->isChecked(); qobject_cast<QCheckBox *>(optionWidgets["resetVolumeCheckbox"])->isChecked();
module_config_t *p_config = config_FindConfig( VLC_OBJECT(p_intf), "aout" ); char *psz_aout = config_GetPsz( p_intf, "aout" );
char *psz_aout = p_config->value.psz;
float f_gain = powf( i_volume / 100.f, 3 ); float f_gain = powf( i_volume / 100.f, 3 );
...@@ -1129,6 +1127,7 @@ void SPrefsPanel::apply() ...@@ -1129,6 +1127,7 @@ void SPrefsPanel::apply()
config_PutFloat( p_intf, "jack-gain", f_gain ); config_PutFloat( p_intf, "jack-gain", f_gain );
#endif #endif
#undef save_vol_aout #undef save_vol_aout
free( psz_aout );
config_PutInt( p_intf, "volume-save", !b_reset_volume ); config_PutInt( p_intf, "volume-save", !b_reset_volume );
......
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