mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2026-09-10 18:46:30 -06:00
Skip glfwSetWindowAttrib if MC version < 1.13
For some reason, calling to JNI functions resulted in `null pointer deference`, despite having assert() that was not triggered. This is a workaround only to skip calling.
This commit is contained in:
parent
c47f14d3bf
commit
34736cb702
1 changed files with 4 additions and 2 deletions
|
|
@ -416,8 +416,10 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwSetShowingWindow(JNIEnv* en
|
|||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSetWindowAttrib(JNIEnv* env, jclass clazz, jint attrib, jint value) {
|
||||
if (!showingWindow) {
|
||||
return; // nothing to do yet
|
||||
if (!showingWindow || !isUseStackQueueCall) {
|
||||
// If the window is not shown, there is nothing to do yet.
|
||||
// For Minecraft < 1.13, calling to JNI functions here crashes the JVM for some reason, therefore it is skipped for now.
|
||||
return;
|
||||
}
|
||||
|
||||
jclass glfwClazz = (*runtimeJNIEnvPtr_JRE)->FindClass(runtimeJNIEnvPtr_JRE, "org/lwjgl/glfw/GLFW");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue