summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-10-18 09:55:54 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-10-18 09:55:54 -0600
commit6c6c2f1d23b02491c60e0cbce6815b468ff14c08 (patch)
tree138e8bbf85e127b6102ddbf5d2c4935873475506 /src/mesa/state_tracker/st_atom_framebuffer.c
parentd422c1eb5c0fac8f946758ecce96072505c77683 (diff)
gallium: add some checks for null surface pointers in state tracker
Fixes some segfaults in low memory situations.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index 80df3b0506..2916886610 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -118,9 +118,10 @@ update_framebuffer_state( struct st_context *st )
update_renderbuffer_surface(st, strb);
}
- assert(strb->surface);
- framebuffer->cbufs[framebuffer->num_cbufs] = strb->surface;
- framebuffer->num_cbufs++;
+ if (strb->surface) {
+ framebuffer->cbufs[framebuffer->num_cbufs] = strb->surface;
+ framebuffer->num_cbufs++;
+ }
}
}
@@ -132,7 +133,6 @@ update_framebuffer_state( struct st_context *st )
update_renderbuffer_surface(st, strb);
}
- assert(strb->surface);
framebuffer->zsbuf = strb->surface;
}
else {