Fixed null exception in CharacterInventory

This commit is contained in:
Regalis
2016-10-12 20:57:06 +03:00
parent 1d25362df6
commit 060a1db431
@@ -299,6 +299,8 @@ namespace Barotrauma
Rectangle slotRect = new Rectangle(0, 0, rectWidth, rectHeight);
for (int i = 0; i < capacity; i++)
{
if (slots[i] == null) slots[i] = new InventorySlot(slotRect);
slots[i].Disabled = false;
slotRect.X = (int)(SlotPositions[i].X + DrawOffset.X);