Attempt to diagnose null reference exception during Ragdoll drawing (see #278)
This commit is contained in:
@@ -73,6 +73,12 @@ namespace Barotrauma
|
||||
|
||||
Collider.UpdateDrawPosition();
|
||||
|
||||
if (Limbs == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Failed to draw a ragdoll, limbs have been removed. Character: \"" + character.Name + "\", removed: " + character.Removed + "\n" + Environment.StackTrace);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Limb limb in Limbs)
|
||||
{
|
||||
limb.Draw(spriteBatch);
|
||||
|
||||
Reference in New Issue
Block a user