From d4989b3a532b4a134fa061583114f006d6f22673 Mon Sep 17 00:00:00 2001 From: richardash1981 Date: Mon, 6 May 2013 10:29:06 +0000 Subject: [PATCH] Patch by Steve the Fiddle to trap another invalid return from Nyquist and prevent crashing Audacity --- src/effects/nyquist/Nyquist.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 8bef25d03..d8f05352e 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -920,6 +920,13 @@ bool EffectNyquist::ProcessOne() return false; } + if (outChannels == 0) { + wxMessageBox(_("Nyquist returned an empty array.\n"), + wxT("Nyquist"), + wxOK | wxCENTRE, mParent); + return false; + } + double rate = mCurTrack[0]->GetRate(); for (i = 0; i < outChannels; i++) { sampleFormat format = mCurTrack[i]->GetSampleFormat();