summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-07 13:19:00 -0700
committerBen Skeggs <skeggsb@gmail.com>2007-12-09 12:05:27 +1100
commitf36258d7e1668afcbd5b1deb6a405b9f211bf3ee (patch)
tree18a28ca806a55cd6a87bf06c673cdade578bf43e /src/mesa/pipe
parent1eb78225c4759f4295f0700f25f77c52d6acb2eb (diff)
don't dereference pt after realloc - fixes valgrind error
Diffstat (limited to 'src/mesa/pipe')
-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 e8cdd67435..2288c343bf 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);
}