From dd87c43a44871e6cf7c3328120c50447bd69c26c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 7 Dec 2007 13:19:00 -0700 Subject: [PATCH] don't dereference pt after realloc - fixes valgrind error --- src/mesa/pipe/softpipe/sp_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2