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.
This commit is contained in:
Michel Dänzer 2009-07-07 12:17:04 +02:00
parent a4d952358d
commit 96601ec8e0

View file

@ -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;
}
}