summaryrefslogtreecommitdiffstats
path: root/src/glx/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r--src/glx/glxext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 2711e57b793..4a195bd40ba 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -269,7 +269,8 @@ __glXCloseDisplay(Display * dpy, XExtCodes * codes)
}
_XUnlockMutex(_Xglobal_lock);
- glx_display_free(priv);
+ if (priv != NULL)
+ glx_display_free(priv);
return 1;
}