mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02: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++) {
|
for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
|
||||||
strb = st_renderbuffer(fb->_ColorDrawBuffers[i]);
|
strb = st_renderbuffer(fb->_ColorDrawBuffers[i]);
|
||||||
|
|
||||||
/*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/
|
if (strb) {
|
||||||
if (strb->rtt) {
|
/*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/
|
||||||
/* rendering to a GL texture, may have to update surface */
|
if (strb->rtt) {
|
||||||
update_renderbuffer_surface(st, strb);
|
/* rendering to a GL texture, may have to update surface */
|
||||||
}
|
update_renderbuffer_surface(st, strb);
|
||||||
|
}
|
||||||
|
|
||||||
if (strb->surface) {
|
if (strb->surface) {
|
||||||
framebuffer->cbufs[framebuffer->nr_cbufs] = strb->surface;
|
framebuffer->cbufs[framebuffer->nr_cbufs] = strb->surface;
|
||||||
framebuffer->nr_cbufs++;
|
framebuffer->nr_cbufs++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue