Fixed IndexOutOfRange exceptions when cloning items with requiredItems that aren't present in the xml, + some more exception handling & error logging

This commit is contained in:
Joonas Rikkonen
2018-09-10 12:06:39 +03:00
parent 2b3c0d103b
commit 57c9e5a731
3 changed files with 26 additions and 4 deletions
@@ -170,7 +170,7 @@ namespace Barotrauma
{
get
{
return subBody.Borders;
return subBody == null ? Rectangle.Empty : subBody.Borders;
}
}