Free visinfo object (Tilman Sauerbeck)
This commit is contained in:
parent
b4f70646b4
commit
361bccb4ec
|
@ -262,6 +262,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
|
||||||
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
|
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
fprintf(stderr, "Error: glXCreateContext failed\n");
|
fprintf(stderr, "Error: glXCreateContext failed\n");
|
||||||
|
XFree(visinfo);
|
||||||
XDestroyWindow(dpy, win);
|
XDestroyWindow(dpy, win);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -336,6 +337,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
|
||||||
}
|
}
|
||||||
|
|
||||||
glXDestroyContext(dpy, ctx);
|
glXDestroyContext(dpy, ctx);
|
||||||
|
XFree(visinfo);
|
||||||
XDestroyWindow(dpy, win);
|
XDestroyWindow(dpy, win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue