Skip to content

Commit e3af1a5

Browse files
committed
Assert against destroying objects that still have a script state
1 parent 08756c3 commit e3af1a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Entities/MovableObject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ void MovableObject::DestroyScriptState() {
548548
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
549549

550550
void MovableObject::Destroy(bool notInherited) {
551+
RTEAssert(m_ThreadedLuaState == nullptr, "Destroying an MO that still has a script state!");
552+
551553
g_MovableMan.UnregisterObject(this);
552554
if (!notInherited) {
553555
SceneObject::Destroy();

0 commit comments

Comments
 (0)