Module: Mesa
Branch: 7.10
Commit: 76366ee06b03c5eff259c2b4fdbb62c3c2638dd8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=76366ee06b03c5eff259c2b4fdbb62c3c2638dd8

Author: Dave Airlie <airl...@redhat.com>
Date:   Wed Jan 19 16:27:13 2011 +1000

radeon: avoid segfault on 3D textures.

This is a candidate for 7.9 and 7.10

---

 src/mesa/drivers/dri/radeon/radeon_state.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c 
b/src/mesa/drivers/dri/radeon/radeon_state.c
index cae12f1..51e4b8f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -2091,6 +2091,9 @@ static GLboolean r100ValidateBuffers(struct gl_context 
*ctx)
         continue;
 
       t = rmesa->state.texture.unit[i].texobj;
+
+      if (!t)
+        continue;
       if (t->image_override && t->bo)
        radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, t->bo,
                           RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to