diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 2efe191..f5522d9 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -1395,7 +1395,8 @@ glXChooseVisual(Display * dpy, int screen, int *attribList) &visualTemplate, &i); if (newList) { - Xfree(visualList); + if (visualList) + XFree(visualList); visualList = newList; best_config = modes; }