dri: Assert pointer is not null before dereferencing.

This commit is contained in:
Vinson Lee 2010-02-27 02:18:06 -08:00
parent 307071fe1e
commit e63f532d26
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ static int driBindContext(__DRIcontext *pcp,
** initialize the drawable information if has not been done before.
*/
assert(psp);
if (!psp->dri2.enabled) {
if (pdp && !pdp->pStamp) {
DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);