mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
xdemos/glxcontexts: Don't leak visual info when choosing visual again.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
This commit is contained in:
parent
ed6125fe9b
commit
b59eb3b8b1
1 changed files with 3 additions and 0 deletions
|
|
@ -378,6 +378,9 @@ make_window( Display *dpy, const char *name,
|
|||
scrnum = DefaultScreen( dpy );
|
||||
root = RootWindow( dpy, scrnum );
|
||||
|
||||
if (visinfo)
|
||||
XFree(visinfo);
|
||||
|
||||
visinfo = glXChooseVisual( dpy, scrnum, attribs );
|
||||
if (!visinfo) {
|
||||
printf("Error: couldn't get an RGB, Double-buffered visual\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue