Linux: native error handling fixes
This commit is contained in:
parent
851c4d3129
commit
8feec32e60
|
@ -710,11 +710,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateContext(JNIEnv
|
|||
return;
|
||||
}
|
||||
|
||||
bool result;
|
||||
if (USEGLX13) {
|
||||
initWindowGLX13(env, pixel_format);
|
||||
result = initWindowGLX13(env, pixel_format);
|
||||
} else {
|
||||
initWindowGLX(env, pixel_format);
|
||||
result = initWindowGLX(env, pixel_format);
|
||||
}
|
||||
if (!result)
|
||||
decDisplay();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyContext(JNIEnv *env, jobject this) {
|
||||
|
|
|
@ -156,10 +156,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreatePbuffer(JNIEnv
|
|||
PbufferInfo *buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, handle_buffer);
|
||||
bool result;
|
||||
result = createPbufferUsingUniqueContext(env, buffer_info, pixel_format, width, height, buffer_attribs, shared_context);
|
||||
if (!result)
|
||||
return;
|
||||
if (!checkXError(env)) {
|
||||
if (!result) {
|
||||
decDisplay();
|
||||
return;
|
||||
}
|
||||
if (!checkXError(env)) {
|
||||
destroyPbuffer(buffer_info);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue