summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index 4fdb6730879..7d7d3823c99 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -63,16 +63,19 @@ display_front_buffer(struct st_context *st)
GLframebuffer *fb = st->ctx->DrawBuffer;
struct st_renderbuffer *strb
= st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
- struct pipe_surface *front_surf = strb->surface;
- /* Hook for copying "fake" frontbuffer if necessary:
- */
- st->pipe->screen->flush_frontbuffer( st->pipe->screen, front_surf,
- st->pipe->priv );
-
- /*
- st->frontbuffer_status = FRONT_STATUS_UNDEFINED;
- */
+ if (strb) {
+ struct pipe_surface *front_surf = strb->surface;
+
+ /* Hook for copying "fake" frontbuffer if necessary:
+ */
+ st->pipe->screen->flush_frontbuffer( st->pipe->screen, front_surf,
+ st->pipe->priv );
+
+ /*
+ st->frontbuffer_status = FRONT_STATUS_UNDEFINED;
+ */
+ }
}