Skip to content

Commit 528c4bc

Browse files
committed
Hopeful fix to items having threaded update called when in inventory
1 parent 78302b7 commit 528c4bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/Managers/MovableMan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,9 @@ void MovableMan::Update() {
13341334
g_LuaMan.SetThreadLuaStateOverride(&luaState);
13351335

13361336
for (MovableObject* mo: luaState.GetRegisteredMOs()) {
1337-
mo->RunScriptedFunctionInAppropriateScripts(threadedUpdate, false, false, {}, {}, {});
1337+
if (ValidMO(mo->GetRootParent())) {
1338+
mo->RunScriptedFunctionInAppropriateScripts(threadedUpdate, false, false, {}, {}, {});
1339+
}
13381340
}
13391341

13401342
g_LuaMan.SetThreadLuaStateOverride(nullptr);

0 commit comments

Comments
 (0)