Skip to content

Commit

Permalink
fix nullPointerException (#778)
Browse files Browse the repository at this point in the history
Fixed error message when closing wheat minion in hub. #778
  • Loading branch information
Thunderblade73 authored Dec 9, 2023
1 parent 533bd58 commit e3200d4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ class MinionFeatures {
coinsPerDay = ""
lastInventoryClosed = System.currentTimeMillis()

val location = lastMinion ?: return
if (IslandType.PRIVATE_ISLAND.isInIsland()) {
val location = lastMinion ?: return

if (location !in minions) {
minions[location]!!.lastClicked = 0
if (location !in minions) {
minions[location]?.lastClicked = 0
}
}
MinionCloseEvent().postAndCatch()
}
Expand Down

0 comments on commit e3200d4

Please sign in to comment.