Merge pull request #8919 from abextm/farming-null
timetracking: Don't crash when seeing a garbage varbit value
This commit is contained in:
@@ -187,6 +187,11 @@ public class FarmingTracker
|
|||||||
|
|
||||||
PatchState state = patch.getImplementation().forVarbitValue(value);
|
PatchState state = patch.getImplementation().forVarbitValue(value);
|
||||||
|
|
||||||
|
if (state == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
int stage = state.getStage();
|
int stage = state.getStage();
|
||||||
int stages = state.getStages();
|
int stages = state.getStages();
|
||||||
int tickrate = state.getTickRate() * 60;
|
int tickrate = state.getTickRate() * 60;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.timetracking.farming;
|
package net.runelite.client.plugins.timetracking.farming;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.runelite.client.plugins.timetracking.Tab;
|
import net.runelite.client.plugins.timetracking.Tab;
|
||||||
@@ -2576,6 +2577,7 @@ public enum PatchImplementation
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Nullable
|
||||||
abstract PatchState forVarbitValue(int value);
|
abstract PatchState forVarbitValue(int value);
|
||||||
|
|
||||||
private final Tab tab;
|
private final Tab tab;
|
||||||
|
|||||||
Reference in New Issue
Block a user