Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
NatanLifshitz committed Dec 20, 2023
1 parent c134111 commit 32d24bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
### 4.4.7
- Fixed crash in certain cases
### 4.4.6
- Fixed quit button not have the correct text in some cases.
- Crash initialization screen is now disabled when Sodium is installed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package fudge.notenoughcrashes.fabric.mixins.iris;

import fudge.notenoughcrashes.NotEnoughCrashes;
import fudge.notenoughcrashes.fabric.platform.FabricPlatform;
import fudge.notenoughcrashes.platform.NecPlatform;
import net.coderbot.iris.Iris;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand All @@ -15,13 +13,10 @@
*/
@Mixin(Iris.class)
public class SilentNEC {
@Shadow(remap = false)
private static boolean hasNEC;

@Inject(at = @At("TAIL"), method = "onEarlyInitialize", remap = false)
private void onEarlyInitialize(CallbackInfo info) {
var platform = (FabricPlatform)NecPlatform.instance();
platform.setIrisExists();
hasNEC = false; // NEC doesn't exist Iris, it doesn't exist...
}
}

0 comments on commit 32d24bd

Please sign in to comment.