From e31a37966154cc8171a8663cf5aa4ef1dd070f97 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 27 Feb 2010 14:56:27 -0800 Subject: unichrome: Assert that pointer is not null before dereferencing. --- src/mesa/drivers/dri/unichrome/via_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index c9a31f3383c..25aad1b204e 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -757,6 +757,8 @@ static void via_emit_cliprect(struct via_context *vmesa, vb[0] = HC_HEADER2; vb[1] = (HC_ParaType_NotTex << 16); + assert(vmesa->driDrawable); + if (vmesa->driDrawable->w == 0 || vmesa->driDrawable->h == 0) { vb[2] = (HC_SubA_HClipTB << 24) | 0x0; vb[3] = (HC_SubA_HClipLR << 24) | 0x0; -- cgit v1.2.3