NPE Fix for Barrows

This commit is contained in:
Ganom
2019-05-29 19:09:03 -04:00
parent 48623e71a4
commit 6a399061e9

View File

@@ -257,6 +257,8 @@ public class BarrowsPlugin extends Plugin
puzzleAnswer = null; puzzleAnswer = null;
} }
else if (event.getGameState() == GameState.LOGGED_IN) else if (event.getGameState() == GameState.LOGGED_IN)
{
if (client.getLocalPlayer() != null)
{ {
boolean isInCrypt = isInCrypt(); boolean isInCrypt = isInCrypt();
if (wasInCrypt && !isInCrypt) if (wasInCrypt && !isInCrypt)
@@ -269,6 +271,7 @@ public class BarrowsPlugin extends Plugin
} }
} }
} }
}
@Subscribe @Subscribe
public void onWidgetLoaded(WidgetLoaded event) public void onWidgetLoaded(WidgetLoaded event)