From a6699ed49486f192fc8820ba66327489f596e516 Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 17 Feb 2020 16:31:40 +0000 Subject: [PATCH] Bug 2283 - Crash on editing Nyquist Generator plug-in parameters in Macro Big Thanks to Steve for finding this and writing clear steps to reproduce when logging this bug in Bugzilla. Also thanks to Peter for confirming the same bug is present on Windows, i.e. is all platforms, not just Linux. --- src/effects/Effect.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index eb7552a2f..c29f20f8c 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -786,7 +786,9 @@ NumericFormatSymbol Effect::GetDurationFormat() NumericFormatSymbol Effect::GetSelectionFormat() { - return ProjectSettings::Get( *FindProject() ).GetSelectionFormat(); + if( FindProject() ) + return ProjectSettings::Get( *FindProject() ).GetSelectionFormat(); + return NumericConverter::HoursMinsSecondsFormat(); } void Effect::SetDuration(double seconds) @@ -2247,6 +2249,8 @@ void Effect::ReplaceProcessedTracks(const bool bGoodResult) const AudacityProject *Effect::FindProject() const { + if (!inputTracks()) + return nullptr; return inputTracks()->GetOwner(); }