diff options
author | Vinson Lee <[email protected]> | 2010-02-27 14:56:27 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-02-27 14:56:27 -0800 |
commit | e31a37966154cc8171a8663cf5aa4ef1dd070f97 (patch) | |
tree | 9ba40d74dd14a936aa4ed3cb3bb610856885f3b9 /src/mesa | |
parent | 1eba490202b09ee87f1c8af5a3bb77b5c3f23599 (diff) |
unichrome: Assert that pointer is not null before dereferencing.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_ioctl.c | 2 |
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 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; |