From 671a9a2f5c54c095156bd9f1ff462eddb3f6a5e8 Mon Sep 17 00:00:00 2001 From: ev chang Date: Fri, 21 Jun 2024 09:07:04 +0700 Subject: [PATCH] Fix NPE --- .../polyfrost/colorsaturation/mixin/OptifineConfigMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/polyfrost/colorsaturation/mixin/OptifineConfigMixin.java b/src/main/java/org/polyfrost/colorsaturation/mixin/OptifineConfigMixin.java index fe3c5e0..0da0411 100644 --- a/src/main/java/org/polyfrost/colorsaturation/mixin/OptifineConfigMixin.java +++ b/src/main/java/org/polyfrost/colorsaturation/mixin/OptifineConfigMixin.java @@ -15,7 +15,7 @@ public class OptifineConfigMixin { @Dynamic("OptiFine") @Inject(method = "isFastRender", at = @At("HEAD"), cancellable = true) private static void cancelFastRender(CallbackInfoReturnable cir) { - if (ColorSaturation.config.enabled && SaturationConfig.forceDisableFastRender) { + if (ColorSaturation.config != null && ColorSaturation.config.enabled && SaturationConfig.forceDisableFastRender) { cir.setReturnValue(false); } }