summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-01-04 08:00:33 -0700
committerBrian Paul <brianp@vmware.com>2011-01-04 08:00:33 -0700
commitadb49457c68b925bcc6f05587f11a0c64dae3942 (patch)
treeadbd2b4171475003465de2eee6940007b1d6d356 /src/mesa
parent9da0e20e467b996ead83497242596891c4f7b7a8 (diff)
st/mesa: fix renderbuffer pointer check in st_Clear()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=30694 NOTE: This is a candidate for the 7.9 and 7.10 branches. (cherry picked from commit efbd33aff93d875af95d40db018b7911a3f87d02)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index bd1dd78b23c..6571bf237fb 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -470,13 +470,9 @@ st_Clear(struct gl_context *ctx, GLbitfield mask)
if (mask & (1 << b)) {
struct gl_renderbuffer *rb
= ctx->DrawBuffer->Attachment[b].Renderbuffer;
- struct st_renderbuffer *strb;
+ struct st_renderbuffer *strb = st_renderbuffer(rb);
- assert(rb);
-
- strb = st_renderbuffer(rb);
-
- if (!strb->surface)
+ if (!strb || !strb->surface)
continue;
if (check_clear_color_with_quad( ctx, rb ))