diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 83841de..ca4ec3b 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -568,6 +568,8 @@ static int driUnbindContext(__DRIcontext *pcp) if (pcp == NULL) return GL_FALSE; + pcp->driScreenPriv->driver->UnbindContext(pcp); + pdp = pcp->driDrawablePriv; prp = pcp->driReadablePriv; @@ -575,8 +577,6 @@ static int driUnbindContext(__DRIcontext *pcp) if (!pdp && !prp) return GL_TRUE; - pcp->driScreenPriv->driver->UnbindContext(pcp); - assert(pdp); if (pdp->refcount == 0) { /* ERROR!!! */