From: Brian Paul Date: Sun, 4 Sep 2005 14:59:18 +0000 (+0000) Subject: replace assertion with a conditional return X-Git-Tag: 062012170305~22114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16f76703a54795377a4894be26cd5239f814417f;p=profile%2Fivi%2Fmesa.git replace assertion with a conditional return --- diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index 8376fa2..817cb86 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;