mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-20 09:31:15 +02:00
Commit patch from Leyland fixing bug 462 - crashes with VST plugins due to floating point exceptions.
This commit is contained in:
@@ -87,6 +87,10 @@ SelectionBar::SelectionBar()
|
||||
mListener(NULL), mRate(0.0), mStart(0.0), mEnd(0.0), mAudio(0.0),
|
||||
mLeftTime(NULL), mRightTime(NULL), mAudioTime(NULL)
|
||||
{
|
||||
// Make sure we have a valid rate as the TimeTextCtrl()s created in Populate()
|
||||
// depend on it. Otherwise, division-by-zero floating point exceptions will occur.
|
||||
// Refer to bug #462 for a scenario where the division-by-zero causes Audacity to fail.
|
||||
mRate = (double) gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), AudioIO::GetOptimalSupportedSampleRate());
|
||||
}
|
||||
|
||||
SelectionBar::~SelectionBar()
|
||||
|
Reference in New Issue
Block a user