Linux: Added missing throwException in display.cpp.initDisplay()

This commit is contained in:
Elias Naur 2004-08-21 17:42:23 +00:00
parent a558ad68b2
commit 0d4d5b6bf1
1 changed files with 4 additions and 3 deletions

View File

@ -130,8 +130,8 @@ static int getGammaRampLength(Display *disp, int screen) {
}
jobject initDisplay(JNIEnv *env) {
int num_modes;
XF86VidModeModeInfo **avail_modes;
int num_modes;
XF86VidModeModeInfo **avail_modes;
int screen;
Display *disp = XOpenDisplay(NULL);
if (disp == NULL) {
@ -141,7 +141,8 @@ jobject initDisplay(JNIEnv *env) {
screen = DefaultScreen(disp);
if (!getDisplayModes(disp, screen, &num_modes, &avail_modes)) {
printfDebug("Could not get display modes\n");
throwException(env, "Could not get display modes");
return NULL;
}
saved_width = avail_modes[0]->hdisplay;
saved_height = avail_modes[0]->vdisplay;