forked from rosebudai/OpenRCT2-Web
Improve safety on event handlers from windows
This commit is contained in:
1 parent
8f34029e89
commit
3864795a08
2 files changed
+4
-3
No files matched your search
@@ -868,8 +868,9 @@ DukValue ScriptEngine::ExecutePluginCall(
|
||||
return ExecutePluginCall(plugin, func, dukUndefined, args, isGameStateMutable);
|
||||
}
|
||||
|
||||
// Must pass plugin by-value, a JS function could destroy the original reference
|
||||
DukValue ScriptEngine::ExecutePluginCall(
|
||||
const std::shared_ptr<Plugin>& plugin, const DukValue& func, const DukValue& thisValue, const std::vector<DukValue>& args,
|
||||
std::shared_ptr<Plugin> plugin, const DukValue& func, const DukValue& thisValue, const std::vector<DukValue>& args,
|
||||
bool isGameStateMutable)
|
||||
{
|
||||
DukStackFrame frame(_context);
|
||||
|
||||
Reference in new issue
Block a user