hunter plugin: Fix null pointer when going across a loading zone

This commit is contained in:
Max Weber
2018-02-17 22:09:48 -07:00
parent 1ae1362410
commit f7c59bf8ba

View File

@@ -110,7 +110,8 @@ public class TrapOverlay extends Overlay
Widget viewport = client.getViewportWidget();
for (HunterTrap trap : plugin.getTraps())
{
if (viewport != null && viewport.contains(trap.getGameObject().getCanvasLocation()))
net.runelite.api.Point trapLoc = trap.getGameObject().getCanvasLocation();
if (viewport != null && trapLoc != null && viewport.contains(trapLoc))
{
switch (trap.getState())
{