From 9b84deb43be220c9639196e7c7198446bcb8d51f Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 24 Aug 2018 16:53:34 +0100 Subject: [PATCH] Bug 1946 - Nyquist ;type tool effects crash if returning labels from Nyquist --- src/effects/nyquist/Nyquist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 7f27ff5c0..64534a957 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -1360,6 +1360,12 @@ bool NyquistEffect::ProcessOne() rval = nyx_error; } + if ((rval == nyx_labels) && (GetType() == EffectTypeTool)) { + // Catch this first so that we can also handle other errors. + mDebugOutput = _("';type tool' effects cannot return labels from Nyquist.\n") + mDebugOutput; + rval = nyx_error; + } + if (rval == nyx_error) { // Return value is not valid type. // Show error in debug window if trace enabled, otherwise log.