diff options
author | Alan Hourihane <[email protected]> | 2009-03-19 13:58:04 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2009-03-19 13:59:09 +0000 |
commit | 264c3d218aa2fd8d06b0e91c1079e43e58d3ee7e (patch) | |
tree | d1bc2c34550c4f7644dd0268c6dc2b9cfc433cf1 /src/mesa | |
parent | 9e84e7def152aa8080da59a78795d6434e687403 (diff) |
mesa: check renderbuffer is defined before use.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_framebuffer.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index b32009c19bb..df0f0931eab 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -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++; + } } } |