mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
mesa/st: add check for null front renderbuffer
Not sure if this indicates a problem elsewhere, but without this check trivial/tri-fbo.c segfaults on resize. With the patch, it renders correctly.
This commit is contained in:
parent
af34fa316d
commit
b3be1651f4
1 changed files with 11 additions and 8 deletions
|
|
@ -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 );
|
||||
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;
|
||||
*/
|
||||
/*
|
||||
st->frontbuffer_status = FRONT_STATUS_UNDEFINED;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue