mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2026-08-01 14:19:12 -06: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
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue