From cab77711b3e8d398393677bcefcd413f50503a64 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 27 Feb 2010 16:51:17 -0800 Subject: [PATCH] dri: Add assert to check for null pointer dereference. --- src/mesa/drivers/dri/common/dri_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index a4fd002664b..890ae513397 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -127,6 +127,7 @@ static int driUnbindContext(__DRIcontext *pcp) /* Let driver unbind drawable from context */ (*psp->DriverAPI.UnbindContext)(pcp); + assert(pdp); if (pdp->refcount == 0) { /* ERROR!!! */ return GL_FALSE; -- 2.30.2