client: Fix game crash

This commit is contained in:
Owain van Brakel
2019-07-11 08:19:47 +02:00
parent f259924d92
commit 004826cc99

View File

@@ -86,10 +86,17 @@ public abstract class RSItemContainerMixin implements RSItemContainer
return; return;
} }
InventoryID container = InventoryID.getValue(itemContainerId);
if (container == null)
{
return;
}
rl$lastCycle = cycle; rl$lastCycle = cycle;
rl$lastContainer = itemContainerId; rl$lastContainer = itemContainerId;
ItemContainerChanged event = new ItemContainerChanged(itemContainerId, client.getItemContainer(InventoryID.getValue(itemContainerId))); ItemContainerChanged event = new ItemContainerChanged(itemContainerId, client.getItemContainer(container));
client.getCallbacks().postDeferred(event); client.getCallbacks().postDeferred(event);
} }
} }