From 47de9adece49f78c6e4065bedc69ce13272bc120 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 31 May 2010 19:24:50 +1000 Subject: 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 --- src/gallium/state_trackers/dri/common/dri_context.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/state_trackers/dri') diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/common/dri_context.h index 54e56c6499..b29e853383 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.h +++ b/src/gallium/state_trackers/dri/common/dri_context.h @@ -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; } -- cgit v1.2.3