summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-27 14:56:27 -0800
committerVinson Lee <vlee@vmware.com>2010-02-27 14:56:27 -0800
commite31a37966154cc8171a8663cf5aa4ef1dd070f97 (patch)
tree9ba40d74dd14a936aa4ed3cb3bb610856885f3b9 /src/mesa/drivers/dri/unichrome
parent1eba490202b09ee87f1c8af5a3bb77b5c3f23599 (diff)
unichrome: Assert that pointer is not null before dereferencing.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index c9a31f3383..25aad1b204 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;