From 1c2c1c4560da06aae9d8087766726bc77f101a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Date: Fri, 22 Sep 2006 14:52:31 +0000 Subject: [PATCH] Another obscure bug causing an infinite loop when multiple contexts are bound to a drawable. --- src/mesa/drivers/dri/common/dri_util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index bac5bee6d4a..e403002cf27 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -403,8 +403,9 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) __DRIcontextPrivate *pcp = pdp->driContextPriv; if (!pcp || (pdp != pcp->driDrawablePriv)) { - /* ERROR!!! */ - return; + /* ERROR!!! + * ..but we must ignore it. There can be many contexts bound to a drawable. + */ } psp = pdp->driScreenPriv; @@ -435,6 +436,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) /* Error -- eg the window may have been destroyed. Keep going * with no cliprects. */ + fprintf(stderr, "Drawable destroyed"); pdp->pStamp = &pdp->lastStamp; /* prevent endless loop */ pdp->numClipRects = 0; pdp->pClipRects = NULL;