Module: Mesa
Branch: master
Commit: 53228fe2a8dafe102a3d764de97ee963ecfb4508
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=53228fe2a8dafe102a3d764de97ee963ecfb4508

Author: Marek Olšák <[email protected]>
Date:   Thu Mar 21 19:29:29 2013 +0100

r300g: fix crash while binding a NULL constant buffer

---

 src/gallium/drivers/r300/r300_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_state.c 
b/src/gallium/drivers/r300/r300_state.c
index ad93510..2de0fd6 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -2056,7 +2056,7 @@ static void r300_set_constant_buffer(struct pipe_context 
*pipe,
     struct r300_constant_buffer *cbuf;
     uint32_t *mapped;
 
-    if (!cb)
+    if (!cb || (!cb->buffer && !cb->user_buffer))
         return;
 
     switch (shader) {

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to