Skip to content

Commit a2de4de

Browse files
committed
Fix debug crash on BAR's legmohobp and document why it crashed
1 parent 24ae983 commit a2de4de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rts/Sim/Units/Scripts/UnitScript.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ void CUnitScript::TickAllAnims(int deltaTime)
260260
#endif
261261
#ifdef _DEBUG
262262
for (auto* p : pieces) {
263-
assert(!p->GetDirty());
263+
// NOTE: p can actually be nullptr when the cob script mentions pieces that don't exist in the model!
264+
if (p) assert(!p->GetDirty());
264265
}
265266
#endif // _DEBUG
266267

0 commit comments

Comments
 (0)