(7341d33ff) Fixed nullref exception if a fabricator finishes creating an item after the user has been removed.
This commit is contained in:
@@ -110,7 +110,7 @@ namespace Barotrauma
|
||||
{
|
||||
get
|
||||
{
|
||||
return collider[colliderIndex];
|
||||
return collider == null ? null : collider[colliderIndex];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,10 +122,10 @@ namespace Barotrauma
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == colliderIndex) return;
|
||||
if (value == colliderIndex || collider == null) return;
|
||||
if (value >= collider.Count || value < 0) return;
|
||||
|
||||
if (collider[colliderIndex].height<collider[value].height)
|
||||
if (collider[colliderIndex].height < collider[value].height)
|
||||
{
|
||||
Vector2 pos1 = collider[colliderIndex].SimPosition;
|
||||
pos1.Y -= collider[colliderIndex].height * ColliderHeightFromFloor;
|
||||
|
||||
@@ -210,13 +210,8 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
Entity.Spawner.AddToSpawnQueue(fabricatedItem.TargetItem, outputContainer.Inventory, fabricatedItem.TargetItem.Health * fabricatedItem.OutCondition);
|
||||
}
|
||||
|
||||
bool isNotClient = true;
|
||||
#if CLIENT
|
||||
isNotClient = GameMain.Client == null;
|
||||
#endif
|
||||
|
||||
if (isNotClient && user != null)
|
||||
|
||||
if ((GameMain.NetworkMember == null || GameMain.NetworkMember.IsServer) && user != null && !user.Removed)
|
||||
{
|
||||
foreach (Skill skill in fabricatedItem.RequiredSkills)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user