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