From fe25476c04b341d50777b8edd0533f7c838f6361 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 26 Feb 2010 09:03:31 -0700 Subject: mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage() The rb->InternalFormat field will be set by the caller if the allocation succeeds. Until then, this field's value can't be used. Fixes a failed assertion with FlightGear. --- src/mesa/main/renderbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 4276b23b696..2f429240465 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -1142,7 +1142,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, rb->Width = width; rb->Height = height; - rb->_BaseFormat = _mesa_base_fbo_format(ctx, rb->InternalFormat); + rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat); ASSERT(rb->_BaseFormat); return GL_TRUE; -- cgit v1.2.3