Skip to content

Commit

Permalink
Merge pull request #140 from bryanperris/objunlink-sanity-check
Browse files Browse the repository at this point in the history
Object unlink sanity check
  • Loading branch information
Lgt2x authored Apr 22, 2024
2 parents a36797e + ff2cd16 commit a1531bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Descent3/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,11 @@ void ObjUnlink(int objnum) {

ASSERT(objnum != -1);

// If object is already unlinked, do nothing
if (obj->roomnum == -1) {
return;
}

if (obj->flags & OF_BIG_OBJECT) {
BigObjRemove(objnum);
}
Expand Down

0 comments on commit a1531bb

Please sign in to comment.