From ed466608ab020486c6b942bad4cbe0a7f6da3c2f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:06:20 +0200 Subject: Fixed NPE in FarmingContestAPI --- .../hannibal2/skyhanni/features/garden/contest/FarmingContestAPI.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') 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() } } -- cgit