Deal with Creatures being deleted before a battle they're part of.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ void BattleSide::SetCreature(ArbUt::OptionalBorrowedPtr<Creature> creature, uint
|
||||
if (old.HasValue()) {
|
||||
old.GetValue()->SetOnBattleField(false);
|
||||
}
|
||||
_creatures[index] = creature.GetValue();
|
||||
_creatures[index] = creature;
|
||||
if (!creature.HasValue()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user