Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -171,6 +171,7 @@ void EntityScriptingInterface::attachDefaultEventHandlers(ScriptManager* manager · 170 unmodified lines | ||
| 171 | 171 | return [manager, eventName](const EntityItemID& entityItemID, const PointerEvent& event) { |
| 172 | 172 | if (!EntityTree::areEntityClicksCaptured()) { |
| 173 | 173 | ScriptEngine* engine = manager->engine().get(); |
| 174 | + auto scopeGuard = engine->getScopeGuard(); | |
| 174 | 175 | manager->forwardHandlerCall(entityItemID, eventName, |
| 175 | 176 | { EntityItemIDtoScriptValue(engine, entityItemID), event.toScriptValue(engine) }); |
| 176 | 177 | } |