raidsthieving: NPE check (#1958)

This commit is contained in:
Owain van Brakel
2019-11-08 06:19:50 +01:00
committed by James
parent 4e3b1ba8bb
commit 36b81d9247

View File

@@ -176,7 +176,7 @@ public class RaidsThievingPlugin extends Plugin
if (obj.getId() == ObjectID.CHEST_29744 || obj.getId() == ObjectID.CHEST_29745)
{
ThievingChest chest = chests.get(obj.getWorldLocation());
if (solver != null && chest.getChestId() != -1)
if (solver != null && chest != null && chest.getChestId() != -1)
{
chest.setEverOpened(true);
solver.addGrubsChest(chest.getChestId());