mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-20 01:27:02 -04:00
Fix a NPE when windowAttribs.get() = null
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
at org.lwjgl.glfw.GLFW.glfwGetWindowAttrib(GLFW.java:895)
This commit is contained in:
@@ -892,7 +892,11 @@ public class GLFW
|
||||
}
|
||||
|
||||
public static int glfwGetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib) {
|
||||
return internalGetWindow(window).windowAttribs.get(attrib);
|
||||
Object obj = internalGetWindow(window).windowAttribs.get(attrib);
|
||||
if (obj == null) {
|
||||
return 0;
|
||||
}
|
||||
return (int) obj;
|
||||
}
|
||||
|
||||
public static void glfwSetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib, int value) {
|
||||
|
||||
Reference in New Issue
Block a user