Mesa (master): unichrome: Assert that pointer is not null before dereferencing.
Vinson Lee
vlee at kemper.freedesktop.org
Sat Feb 27 22:57:12 UTC 2010
Module: Mesa
Branch: master
Commit: e31a37966154cc8171a8663cf5aa4ef1dd070f97
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e31a37966154cc8171a8663cf5aa4ef1dd070f97
Author: Vinson Lee <vlee at vmware.com>
Date: Sat Feb 27 14:56:27 2010 -0800
unichrome: Assert that pointer is not null before dereferencing.
---
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 c9a31f3..25aad1b 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;
More information about the mesa-commit
mailing list