diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-30 18:06:20 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-30 18:06:20 +0200 |
commit | ed466608ab020486c6b942bad4cbe0a7f6da3c2f (patch) | |
tree | 0f9a47d2720f7bebc72e33ca6b242dc9bce56f87 /src | |
parent | 3fdb36ffa6a6765236c01e9470fa09702ad3f510 (diff) | |
download | skyhanni-ed466608ab020486c6b942bad4cbe0a7f6da3c2f.tar.gz skyhanni-ed466608ab020486c6b942bad4cbe0a7f6da3c2f.tar.bz2 skyhanni-ed466608ab020486c6b942bad4cbe0a7f6da3c2f.zip |
Fixed NPE in FarmingContestAPI
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt index 8d7e1eae1..75b775174 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt @@ -61,8 +61,8 @@ object FarmingContestAPI { } inContest = currentContest } else { - if (currentCrop != contestCrop) { - FarmingContestEvent(currentCrop!!, FarmingContestPhase.CHANGE).postAndCatch() + if (currentCrop != contestCrop && currentCrop != null) { + FarmingContestEvent(currentCrop, FarmingContestPhase.CHANGE).postAndCatch() startTime = SimpleTimeMark.now() } } |