dri: Add assert to check for null pointer dereference.

This commit is contained in:
Vinson Lee 2010-02-27 16:51:17 -08:00
parent 975f105bb8
commit cab77711b3
1 changed files with 1 additions and 0 deletions

View File

@ -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;