Skip to content

Commit

Permalink
Check if config is null before checking in config
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest authored Aug 17, 2024
1 parent c5fc658 commit 72662bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/co/skyclient/scc/mixins/MinecraftMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void onStartGame(CallbackInfo ci) {

@Inject(method = "displayGuiScreen", at = @At("HEAD"), cancellable = true)
private void onDisplayScreen(GuiScreen i, CallbackInfo ci) {
if (Settings.customMainMenu && SkyclientCosmetics.config.enabled) {
if (Settings.customMainMenu && SkyclientCosmetics.config != null && SkyclientCosmetics.config.enabled) {
if (i instanceof GuiMainMenu && !(i instanceof SkyClientMainMenu) && MixinHook.hasEssentialAcceptedTOS()) {
ci.cancel();
displayGuiScreen(new SkyClientMainMenu());
Expand Down

0 comments on commit 72662bf

Please sign in to comment.