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