Browse Source

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.
tags/intel_2009q2_rc3
Michel Dänzer 16 years ago
parent
commit
96601ec8e0
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/mesa/state_tracker/st_framebuffer.c

+ 2
- 1
src/mesa/state_tracker/st_framebuffer.c 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;
}
}


Loading…
Cancel
Save