From 16f76703a54795377a4894be26cd5239f814417f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 4 Sep 2005 14:59:18 +0000 Subject: replace assertion with a conditional return --- src/mesa/drivers/dri/common/drirenderbuffer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mesa') 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; -- cgit v1.2.3