Linux: Don't double free the Display connection in the switchDisplayMode error path
This commit is contained in:
parent
0b8e49cb54
commit
4aed85c5bb
|
@ -330,7 +330,6 @@ static bool switchDisplayMode(JNIEnv * env, Display *disp, int screen, jint exte
|
||||||
int height = (*env)->GetIntField(env, mode, fid_height);
|
int height = (*env)->GetIntField(env, mode, fid_height);
|
||||||
int freq = (*env)->GetIntField(env, mode, fid_freq);
|
int freq = (*env)->GetIntField(env, mode, fid_freq);
|
||||||
if (!setMode(env, disp, screen, extension, width, height, freq)) {
|
if (!setMode(env, disp, screen, extension, width, height, freq)) {
|
||||||
XCloseDisplay(disp);
|
|
||||||
throwException(env, "Could not switch mode.");
|
throwException(env, "Could not switch mode.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue