summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_copypix.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-01-04 17:11:33 -0800
committerEric Anholt <eric@anholt.net>2012-01-06 09:49:01 -0800
commit38c6f1e6caf097c0aefc7a9b161e9da3d5235ea9 (patch)
tree10e419596c3b1ae93a40567db2c1329035d85fcc /src/mesa/swrast/s_copypix.c
parentfb5252a3518dadd51e88e87382e6510998e9e2f4 (diff)
downloadexternal_mesa3d-38c6f1e6caf097c0aefc7a9b161e9da3d5235ea9.zip
external_mesa3d-38c6f1e6caf097c0aefc7a9b161e9da3d5235ea9.tar.gz
external_mesa3d-38c6f1e6caf097c0aefc7a9b161e9da3d5235ea9.tar.bz2
swrast: Fix use of uninitialized value in rbmapping changes.
I'm so surprised that gcc didn't catch this that I feel like I must be misreading. srcMap is what we initialize (along with dstMap) from this map value right after this check. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/swrast/s_copypix.c')
-rw-r--r--src/mesa/swrast/s_copypix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index a14b44b..1e0f9fe 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -500,7 +500,7 @@ swrast_fast_copy_pixels(struct gl_context *ctx,
srcRb->Width, srcRb->Height,
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
&map, &rowStride);
- if (!srcMap) {
+ if (!map) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels");
return GL_TRUE; /* don't retry with slow path */
}