LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0903-Fix-NULL-pointer-dereference-in-viaXMesaWindowMoved.patch of Package mesa (Project home:aapgorilla:experimental)

From eafaed0287424361736ae21f67c798a0be1c2cb7 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <cguthrie@mandriva.org>
Date: Tue, 23 Dec 2008 21:01:46 +0000
Subject: [PATCH 903/903] Fix NULL pointer dereference in viaXMesaWindowMoved (fdo#12097)

---
 src/mesa/drivers/dri/unichrome/via_context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 6eb19ac..efe2217 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -730,7 +730,7 @@ void viaXMesaWindowMoved(struct via_context *vmesa)
    struct via_renderbuffer * read_buffer;
    GLuint bytePerPixel = vmesa->viaScreen->bitsPerPixel >> 3;
 
-   if (!drawable)
+   if (!drawable || !vmesa->glCtx->DrawBuffer)
       return;
 
    draw_buffer =  (struct via_renderbuffer *) drawable->driverPrivate;
-- 
1.6.2.4