Clear the top value of a return command, if the listener is NULL

This commit is contained in:
smallmodel 2023-08-30 23:34:29 +02:00
parent 7bc8c3ab5b
commit a99a4a3a2b
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -652,6 +652,7 @@ void ScriptVM::execMethodCommon(op_parmNum_t param)
Listener *const listener = a.listenerValue();
if (!listener) {
m_VMStack.GetTop().Clear();
throw ScriptException("command '%s' applied to NULL listener", Event::GetEventName(eventNum).c_str());
}