Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Assert against destroying objects that still have a script state
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 21, 2023
1 parent 08756c3 commit e3af1a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Entities/MovableObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ void MovableObject::DestroyScriptState() {
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void MovableObject::Destroy(bool notInherited) {
RTEAssert(m_ThreadedLuaState == nullptr, "Destroying an MO that still has a script state!");

g_MovableMan.UnregisterObject(this);
if (!notInherited) {
SceneObject::Destroy();
Expand Down

0 comments on commit e3af1a5

Please sign in to comment.