mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 11:50:09 +01:00
mesa: check renderbuffer is defined before use.
This commit is contained in:
parent
9e84e7def1
commit
264c3d218a
1 changed files with 10 additions and 8 deletions
|
|
@ -112,15 +112,17 @@ update_framebuffer_state( struct st_context *st )
|
|||
for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
|
||||
strb = st_renderbuffer(fb->_ColorDrawBuffers[i]);
|
||||
|
||||
/*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/
|
||||
if (strb->rtt) {
|
||||
/* rendering to a GL texture, may have to update surface */
|
||||
update_renderbuffer_surface(st, strb);
|
||||
}
|
||||
if (strb) {
|
||||
/*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/
|
||||
if (strb->rtt) {
|
||||
/* rendering to a GL texture, may have to update surface */
|
||||
update_renderbuffer_surface(st, strb);
|
||||
}
|
||||
|
||||
if (strb->surface) {
|
||||
framebuffer->cbufs[framebuffer->nr_cbufs] = strb->surface;
|
||||
framebuffer->nr_cbufs++;
|
||||
if (strb->surface) {
|
||||
framebuffer->cbufs[framebuffer->nr_cbufs] = strb->surface;
|
||||
framebuffer->nr_cbufs++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue