Fix crash due to conflicting access to collection in killed Cargo
This commit is contained in:
committed by
abcdefg30
parent
1373a4e16e
commit
320717003f
@@ -189,7 +189,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (Transport == null)
|
||||
return;
|
||||
|
||||
Transport.Trait<Cargo>().Unload(Transport, self);
|
||||
// Something killed us, but it wasn't our transport blowing up. Remove us from the cargo.
|
||||
if (!Transport.IsDead)
|
||||
Transport.Trait<Cargo>().Unload(Transport, self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user