summaryrefslogtreecommitdiffstats
path: root/src/glx/glxext.c
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2011-07-18 00:42:27 +0200
committerHenri Verbeet <[email protected]>2011-07-19 23:27:46 +0200
commit0f20e2e18f902b4319851643e1775a18c2aacb3d (patch)
tree66929bf8012db0b250d8dd4d8fcb9404009b4b98 /src/glx/glxext.c
parentf7dbcba280e4397cadb14f230aa925b4143cdde4 (diff)
glx: Avoid calling __glXInitialize() in driReleaseDrawables().
This fixes a regression introduced by commit a26121f37530619610a78a5fbe5ef87e44047fda (fd.o bug #39219). Since the __glXInitialize() call should be unnecessary anyway, this is probably a nicer fix for the original problem too. NOTE: This is a candidate for the 7.10 and 7.11 branches. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: [email protected]
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r--src/glx/glxext.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 8704c484f96..8254544d1c0 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -260,24 +260,19 @@ glx_display_free(struct glx_display *priv)
static int
__glXCloseDisplay(Display * dpy, XExtCodes * codes)
{
- struct glx_display *priv, **prev, *next;
+ struct glx_display *priv, **prev;
_XLockMutex(_Xglobal_lock);
prev = &glx_displays;
for (priv = glx_displays; priv; prev = &priv->next, priv = priv->next) {
if (priv->dpy == dpy) {
+ *prev = priv->next;
break;
}
}
+ _XUnlockMutex(_Xglobal_lock);
- /* Only remove the display from the list after it's destroyed. The cleanup
- * code (e.g. driReleaseDrawables()) ends up calling __glXInitialize(),
- * which would create a new glx_display while we're trying to destroy this
- * one. */
- next = priv->next;
glx_display_free(priv);
- *prev = next;
- _XUnlockMutex(_Xglobal_lock);
return 1;
}