mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
glx: Avoid calling __glXInitialize() in driReleaseDrawables().
This fixes a regression introduced by commita26121f375(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 <hverbeet@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: padfoot@exemail.com.au (cherry picked from commit0f20e2e18f)
This commit is contained in:
parent
3871c55a18
commit
f81058140f
2 changed files with 5 additions and 10 deletions
|
|
@ -383,7 +383,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
|
|||
_X_HIDDEN void
|
||||
driReleaseDrawables(struct glx_context *gc)
|
||||
{
|
||||
struct glx_display *const priv = __glXInitialize(gc->psc->dpy);
|
||||
const struct glx_display *priv = gc->psc->display;
|
||||
__GLXDRIdrawable *pdraw;
|
||||
|
||||
if (priv == NULL)
|
||||
|
|
|
|||
|
|
@ -260,25 +260,20 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* 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);
|
||||
|
||||
glx_display_free(priv);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue