mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Merge branch 'lua_fix_onActorActive' into 'master'
Validate that object exists before onActorActive Lua handler See merge request OpenMW/openmw!1580
This commit is contained in:
commit
39c7325db7
@ -200,7 +200,13 @@ namespace MWLua
|
||||
}
|
||||
|
||||
for (ObjectId id : mActorAddedEvents)
|
||||
mGlobalScripts.actorActive(GObject(id, objectRegistry));
|
||||
{
|
||||
GObject obj(id, objectRegistry);
|
||||
if (obj.isValid())
|
||||
mGlobalScripts.actorActive(obj);
|
||||
else
|
||||
Log(Debug::Verbose) << "Can not call onActorActive engine handler: object" << idToString(id) << " is already removed";
|
||||
}
|
||||
mActorAddedEvents.clear();
|
||||
|
||||
if (!mWorldView.isPaused())
|
||||
|
Loading…
x
Reference in New Issue
Block a user