diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-22 18:23:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-22 18:23:54 +0100 |
| commit | 2367db77c5ad7e4c2319351bcc9c09b7fc387384 (patch) | |
| tree | 6ea1ad4a22f492818eb2b3710f61c4ac5bc48c7b /src/wx/gain_calculator_dialog.cc | |
| parent | 7333d9ee1ff505cbd635cbca23c83656a705a4a4 (diff) | |
Fix crash on OK-ing gain calculation dialog without entering anything.
Diffstat (limited to 'src/wx/gain_calculator_dialog.cc')
| -rw-r--r-- | src/wx/gain_calculator_dialog.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wx/gain_calculator_dialog.cc b/src/wx/gain_calculator_dialog.cc index fcd54d4cf..3f07faf06 100644 --- a/src/wx/gain_calculator_dialog.cc +++ b/src/wx/gain_calculator_dialog.cc @@ -52,11 +52,19 @@ GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent) float GainCalculatorDialog::wanted_fader () const { + if (_wanted->GetValue().IsEmpty()) { + return 0; + } + return lexical_cast<float> (wx_to_std (_wanted->GetValue ())); } float GainCalculatorDialog::actual_fader () const { + if (_actual->GetValue().IsEmpty()) { + return 0; + } + return lexical_cast<float> (wx_to_std (_actual->GetValue ())); } |
