summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/renderbuffer.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-26 09:03:31 -0700
committerBrian Paul <[email protected]>2010-02-26 09:03:34 -0700
commitfe25476c04b341d50777b8edd0533f7c838f6361 (patch)
treef76f7483f50e2c49b666b6c3aa2ce903ce9bd61e /src/mesa/main/renderbuffer.c
parente215830c38be8ba00257937f5abbb17ec50ae3dc (diff)
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.
Diffstat (limited to 'src/mesa/main/renderbuffer.c')
-rw-r--r--src/mesa/main/renderbuffer.c2
1 files changed, 1 insertions, 1 deletions
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;