summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-12-07 13:19:00 -0700
committerBrian <[email protected]>2007-12-07 13:19:00 -0700
commitdd87c43a44871e6cf7c3328120c50447bd69c26c (patch)
treefeb1c68a5148c835899d8c284e2bb76a20e36364
parente6b5cf342e8a66869d25b68d5a63f3d3600b8aad (diff)
don't dereference pt after realloc - fixes valgrind error
-rw-r--r--src/mesa/pipe/softpipe/sp_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/pipe/softpipe/sp_texture.c b/src/mesa/pipe/softpipe/sp_texture.c
index e8cdd67435b..2288c343bf1 100644
--- a/src/mesa/pipe/softpipe/sp_texture.c
+++ b/src/mesa/pipe/softpipe/sp_texture.c
@@ -386,7 +386,7 @@ softpipe_texture_create(struct pipe_context *pipe, struct pipe_texture **pt)
if (spt->buffer) {
pipe->winsys->buffer_data(pipe->winsys, spt->buffer,
- spt->pitch * (*pt)->cpp *
+ spt->pitch * spt->base.cpp *
spt->total_height, NULL,
PIPE_BUFFER_USAGE_PIXEL);
}