From 3798dec08f3fb1ad8fec329a90a8392c20460d5b Mon Sep 17 00:00:00 2001 From: alexytomi <60690056+alexytomi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:07:39 +0800 Subject: [PATCH] fix(GLFW): Fixx NullPtr when using zink without turnip --- jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java index 0f92e81de..d9ba08bae 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFW.java @@ -1005,7 +1005,9 @@ public class GLFW // These values can be found at headings_array.xml switch (System.getenv("POJAV_RENDERER")) { case "vulkan_zink": - if (System.getenv("POJAV_LOAD_TURNIP").equals("1")) { + Boolean turnipLoad = System.getenv("POJAV_LOAD_TURNIP") != null ? + System.getenv("POJAV_LOAD_TURNIP").equals("1") : false; + if (turnipLoad) { System.out.println("GLFW: Turnip+Zink detected, setting GL context to 4.6"); glMajor = 4; glMinor = 6;