Skip to content

Commit

Permalink
C4Object: Don't do debug checks in all sections since some may have a…
Browse files Browse the repository at this point in the history
…lready been destroyed during game clearing
  • Loading branch information
Fulgen301 committed Nov 17, 2023
1 parent a9ae9dd commit d32011f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/C4Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,9 @@ C4Object::~C4Object()
#ifndef NDEBUG
// debug: mustn't be listed in any list now

for (const auto &section : Game.Sections)
{
assert(!section->Objects.ObjectNumber(this));
assert(!section->Objects.InactiveObjects.ObjectNumber(this));
section->Objects.Sectors.AssertObjectNotInList(this);
}
assert(!Section->Objects.ObjectNumber(this));
assert(!Section->Objects.InactiveObjects.ObjectNumber(this));
Section->Objects.Sectors.AssertObjectNotInList(this);
#endif
}

Expand Down

0 comments on commit d32011f

Please sign in to comment.