diff options
author | Brian Paul <[email protected]> | 2008-10-18 09:55:54 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-10-18 09:55:54 -0600 |
commit | 6c6c2f1d23b02491c60e0cbce6815b468ff14c08 (patch) | |
tree | 138e8bbf85e127b6102ddbf5d2c4935873475506 /src/mesa/state_tracker/st_framebuffer.c | |
parent | d422c1eb5c0fac8f946758ecce96072505c77683 (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_framebuffer.c')
-rw-r--r-- | src/mesa/state_tracker/st_framebuffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c index ec8928f200d..6ee1777fb7a 100644 --- a/src/mesa/state_tracker/st_framebuffer.c +++ b/src/mesa/state_tracker/st_framebuffer.c @@ -289,7 +289,8 @@ st_notify_swapbuffers_complete(struct st_framebuffer *stfb) for (i = 0; i < BUFFER_COUNT; i++) { if (stfb->Base.Attachment[i].Renderbuffer) { strb = st_renderbuffer(stfb->Base.Attachment[i].Renderbuffer); - strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED; + if (strb->surface) + strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED; } } } |