gallium: fix TFP on gallium

This fixes an uninitialised value use in the dri2 st when doing TFP.

It uses the driContextPriv which isn't initialised at alloc time.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2010-05-31 19:24:50 +10:00
parent 7ede18abac
commit 47de9adece
2 changed files with 3 additions and 0 deletions

View file

@ -65,6 +65,8 @@ struct dri_context
static INLINE struct dri_context *
dri_context(__DRIcontext * driContextPriv)
{
if (!driContextPriv)
return NULL;
return (struct dri_context *)driContextPriv->driverPrivate;
}

View file

@ -423,6 +423,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config,
return NULL;
}
pdp->driContextPriv = NULL;
pdp->loaderPrivate = data;
pdp->hHWDrawable = hwDrawable;
pdp->refcount = 1;