diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-03-27 21:43:24 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-03-27 21:43:24 +0000 |
commit | aa011836c2778d242c75547c3f64435a055a86ff (patch) | |
tree | 5fe48158f25e119a5662170ad525ce1c63dfbed8 /src/gallium | |
parent | c03000b73e49b858d6bf256114d28c8e9d7a2802 (diff) |
wgl: Don't flush surface if it is NULL.
Just a quick fix to prevent segfaults with glean.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/wgl/shared/stw_framebuffer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c index 2f0d8cbc31..4641884f95 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c @@ -225,11 +225,14 @@ stw_swap_buffers( */ st_notify_swapbuffers( fb->stfb ); - st_get_framebuffer_surface( fb->stfb, ST_SURFACE_BACK_LEFT, &surf ); - - stw_dev->stw_winsys->flush_frontbuffer(stw_dev->screen, - surf, - hdc ); + if(st_get_framebuffer_surface( fb->stfb, ST_SURFACE_BACK_LEFT, &surf )) { + stw_dev->stw_winsys->flush_frontbuffer(stw_dev->screen, + surf, + hdc ); + } + else { + /* FIXME: this shouldn't happen, but does on glean */ + } return TRUE; } |