mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-17 16:50:26 +02:00
Bug 2360 - Scripting: "Message:" command may crash when using Nyquist with Python
This commit is contained in:
parent
9f5177056d
commit
9827d4a753
@ -128,6 +128,11 @@ int ExecCommand2(wxString *pIn, wxString *pOut)
|
||||
|
||||
// Wait until all responses from the command have been received.
|
||||
// The last response is signalled by an empty line.
|
||||
//
|
||||
// LLL: Allow ExecCommand() to process the responses, otherwise
|
||||
// it will hang waiting for more responses that will not be
|
||||
// forthcoming.
|
||||
#if 0
|
||||
wxString msg = ScriptCommandRelay::ReceiveResponse().GetMessage();
|
||||
while (msg != wxT("\n"))
|
||||
{
|
||||
@ -135,6 +140,7 @@ int ExecCommand2(wxString *pIn, wxString *pOut)
|
||||
*pOut += msg + wxT("\n");
|
||||
msg = ScriptCommandRelay::ReceiveResponse().GetMessage();
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1448,10 +1448,14 @@ bool NyquistEffect::ProcessOne()
|
||||
// if necessary, by gettext or ngettext defined below, before it is
|
||||
// communicated back to C++
|
||||
auto msg = Verbatim( NyquistToWxString(nyx_get_string()) );
|
||||
if (!msg.empty()) // Empty string may be used as a No-Op return value.
|
||||
Effect::MessageBox( msg );
|
||||
else
|
||||
if (!msg.empty()) { // Empty string may be used as a No-Op return value.
|
||||
if (!mExternal) {
|
||||
Effect::MessageBox( msg );
|
||||
}
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
|
||||
// True if not process type.
|
||||
// If not returning audio from process effect,
|
||||
|
Loading…
x
Reference in New Issue
Block a user