summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-27 16:51:17 -0800
committerVinson Lee <vlee@vmware.com>2010-02-27 16:51:17 -0800
commitcab77711b3e8d398393677bcefcd413f50503a64 (patch)
treeb990c090858062b1c111f4abc8b977de16095f92 /src/mesa/drivers
parent975f105bb88fe6c146c091556f142e733885c91a (diff)
dri: Add assert to check for null pointer dereference.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index a4fd002664..890ae51339 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;