From: Vinson Lee Date: Sun, 28 Feb 2010 00:51:17 +0000 (-0800) Subject: dri: Add assert to check for null pointer dereference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cab77711b3e8d398393677bcefcd413f50503a64;p=mesa.git dri: Add assert to check for null pointer dereference. --- 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;