summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-07-07 12:17:04 +0200
committerMichel Dänzer <[email protected]>2009-07-07 12:17:04 +0200
commit96601ec8e0e35d540c1819a48df7f08ec5874ab7 (patch)
treed6610e1b126b3297ac8ca859302cc303c58bb0d4 /src
parenta4d952358d8fd0f9d135c91c37969acdcf394f0a (diff)
gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.
Fixes potential crash when SwapBuffers is called but there's no back buffer.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 33a90ea7db6..fe99fc08926 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -280,7 +280,8 @@ st_notify_swapbuffers(struct st_framebuffer *stfb)
PIPE_FLUSH_SWAPBUFFERS |
PIPE_FLUSH_FRAME,
NULL );
- ctx->st->frontbuffer_status = FRONT_STATUS_COPY_OF_BACK;
+ if (st_renderbuffer(stfb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer))
+ ctx->st->frontbuffer_status = FRONT_STATUS_COPY_OF_BACK;
}
}