Ignore removing non-exists GLFW window

This commit is contained in:
Duy Tran Khanh 2021-02-05 14:02:55 +07:00
parent 63ece80954
commit 0083e6818d

View File

@ -1004,8 +1004,13 @@ public class GLFW
public static void glfwDestroyWindow(long window) {
// Check window exists
try {
internalGetWindow(window);
mGLFWWindowMap.remove(window);
} catch (IllegalArgumentException e) {
System.out.println("GLFW: Warning: failed to remove window " + window);
e.printStackTrace();
}
nglfwSetShowingWindow(mGLFWWindowMap.size() == 0 ? 0 : mGLFWWindowMap.keyAt(mGLFWWindowMap.size() - 1));
}