mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -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:
parent
dcac1c9a97
commit
1f1d542ed7
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user