summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_framebuffer.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-11-10 15:53:51 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-11-10 15:53:51 +1100
commit32e6be6362e44609d36c2fb20a4c858f57c908fb (patch)
tree4ed99e93ef5f4a8bb51653917c911e04e42f5235 /src/mesa/state_tracker/st_framebuffer.c
parent92674bc8889e10e580c630cf85c106fa6eb34d7b (diff)
parent399da3a337932c6074a69ac73e711138271308eb (diff)
Merge remote branch 'origin/gallium-0.2' into gallium-0.2
Diffstat (limited to 'src/mesa/state_tracker/st_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 1ff7009382..6fd731d209 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -176,7 +176,9 @@ st_set_framebuffer_surface(struct st_framebuffer *stfb,
assert(surfIndex < BUFFER_COUNT);
strb = st_renderbuffer(stfb->Base.Attachment[surfIndex].Renderbuffer);
- assert(strb);
+
+ /* fail */
+ if (!strb) return;
/* replace the renderbuffer's surface/texture pointers */
pipe_surface_reference( &strb->surface, surf );
@@ -289,7 +291,8 @@ st_notify_swapbuffers_complete(struct st_framebuffer *stfb)
for (i = 0; i < BUFFER_COUNT; i++) {
if (stfb->Base.Attachment[i].Renderbuffer) {
strb = st_renderbuffer(stfb->Base.Attachment[i].Renderbuffer);
- strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
+ if (strb->surface)
+ strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
}
}
}