jvm crash upon inventory exit when cursors aren't installed on system
queenofthebees opened this issue · 1 comments
two parts to this!
- when any requested cursor in CursorAdapter isn't available on your operating system, glfw returns a null pointer. passing the null pointer to glfwDestroyCursor trips LWJGL's Checks, throwing a nullpointerexception.
- the npe then causes the current screen to be destructed, re-calling destruct on CursorAdapter, calling glfwDestroyCursor on already-freed cursors, resulting in a JVM segfault
easy fix would be filtering for nulls (well, in this case, 0s) before calling glfwDestroyCursor (and also setting the destructed variable before destroying the cursors instead of after)