[Mesa-dev] [PATCH 4/7] swrast: Fix use of uninitialized value in rbmapping changes.
Eric Anholt
eric at anholt.net
Wed Jan 4 18:04:52 PST 2012
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.
---
src/mesa/swrast/s_copypix.c | 2 +-
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 */
}
--
1.7.7.3
More information about the mesa-dev
mailing list