mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-01-02 06:49:59 +01:00
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 freq = (*env)->GetIntField(env, mode, fid_freq);
|
||||
if (!setMode(env, disp, screen, extension, width, height, freq)) {
|
||||
XCloseDisplay(disp);
|
||||
throwException(env, "Could not switch mode.");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue