Added more missing decDisplay()
This commit is contained in:
parent
b50b5ca09b
commit
2e8999c342
|
@ -60,8 +60,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Cursor_nCreateCursor
|
|||
XcursorPixel *pixels = (XcursorPixel *)env->GetDirectBufferAddress(image_buffer) + images_offset;
|
||||
int stride = width*height;
|
||||
XcursorImages *cursor_images = XcursorImagesCreate(num_images);
|
||||
if (cursor_images == NULL)
|
||||
if (cursor_images == NULL) {
|
||||
decDisplay();
|
||||
throwException(env, "Could not allocate cursor.");
|
||||
return;
|
||||
}
|
||||
cursor_images->nimage = num_images;
|
||||
for (int i = 0; i < num_images; i++) {
|
||||
XcursorImage *cursor_image = XcursorImageCreate(width, height);
|
||||
|
|
|
@ -249,6 +249,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nCreate
|
|||
for (i = 0; i < NUM_BUTTONS; i++)
|
||||
buttons[i] = 0;
|
||||
if (!blankCursor()) {
|
||||
decDisplay();
|
||||
throwException(env, "Could not create blank cursor");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -216,6 +216,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate(JNIEnv *env, jclass
|
|||
None, None};
|
||||
|
||||
if (env->GetDirectBufferCapacity(handle_buffer) < sizeof(PbufferInfo)) {
|
||||
decDisplay();
|
||||
throwException(env, "Handle buffer not large enough");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue