diff options
author | Brian Paul <[email protected]> | 2005-09-04 14:59:18 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-04 14:59:18 +0000 |
commit | 16f76703a54795377a4894be26cd5239f814417f (patch) | |
tree | 1cfb7e0d7691699e726d29b15505d378598539c2 /src/mesa/drivers/dri/common | |
parent | 05aed23d1bbc3dbcd9fe9fd592f4c3b245456123 (diff) |
replace assertion with a conditional return
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/drirenderbuffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index 8376fa27170..817cb86c524 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -39,7 +39,7 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb) * \param format Either GL_RGBA, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, * GL_DEPTH_COMPONENT32, or GL_STENCIL_INDEX8_EXT (for now). * \param cpp chars or bytes per pixel - * \param offset start of buffer with respect to framebuffer address + * \param offset start of renderbuffer with respect to start of framebuffer * \param pitch pixels per row */ driRenderbuffer * @@ -124,7 +124,11 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped) const GLuint count = fb->Visual.stereoMode ? 2 : 1; GLuint lr; /* left or right */ - ASSERT(fb->Visual.doubleBufferMode); + /* we shouldn't really call this function if single-buffered, but + * play it safe. + */ + if (!fb->Visual.doubleBufferMode) + return; for (lr = 0; lr < count; lr++) { GLuint frontBuf = (lr == 0) ? BUFFER_FRONT_LEFT : BUFFER_FRONT_RIGHT; |