1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 17:10:05 +02:00

Bug 2321 - Crash on editing ChangePitch parameters in a Macro

EffectChangePitch:: Don't use the inputTracks() when building the GUI
in Batch mode.

Repeat and NyquistEffect had the same problem as they could call
FindProject() which used inputTracks() on a closed project.  Fixed by a change in Effect::GetSelectionFormat().
This commit is contained in:
James Crook 2020-03-06 19:14:31 +00:00
parent 877ffc3287
commit f1b6843b9a
2 changed files with 3 additions and 3 deletions

View File

@ -438,7 +438,7 @@ bool EffectChangePitch::TransferDataFromWindow()
void EffectChangePitch::DeduceFrequencies()
{
auto FirstTrack = [&]()->const WaveTrack *{
if( !inputTracks() )
if( IsBatchProcessing() || !inputTracks() )
return nullptr;
return *( inputTracks()->Selected< const WaveTrack >() ).first;
};

View File

@ -808,7 +808,7 @@ NumericFormatSymbol Effect::GetDurationFormat()
NumericFormatSymbol Effect::GetSelectionFormat()
{
if( FindProject() )
if( !IsBatchProcessing() && FindProject() )
return ProjectSettings::Get( *FindProject() ).GetSelectionFormat();
return NumericConverter::HoursMinsSecondsFormat();
}