bank: null check items (#1906)

bank: null check items
This commit is contained in:
Owain van Brakel
2019-11-07 09:32:49 +01:00
committed by GitHub

View File

@@ -51,7 +51,14 @@ class ContainerCalculation
ContainerPrices calculate(Item[] items)
{
// Returns last calculation if inventory hasn't changed
if (items == null)
{
return null;
}
final int newHash = hashItems(items);
if (containerPrices != null && hash == newHash)
{
return containerPrices;