summaryrefslogtreecommitdiff
path: root/src/glx/x11/indirect_vertex_array.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-08-19 18:53:26 +0000
committerIan Romanick <idr@us.ibm.com>2005-08-19 18:53:26 +0000
commit2ae5645115124ecc97bf4a0ba9f5542cf2409845 (patch)
tree9cd06468e24d54d30d118e0b9e1b2edf83406c12 /src/glx/x11/indirect_vertex_array.c
parentb7c727e5006e26be3f70396030aab7512498f441 (diff)
Fix a realloc problem with indirect vertex arrays. The actual head pointer
wasn't tracked and used for the realloc, so it tended to explode.
Diffstat (limited to 'src/glx/x11/indirect_vertex_array.c')
-rw-r--r--src/glx/x11/indirect_vertex_array.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c
index d4e6ab99ca..62a101e665 100644
--- a/src/glx/x11/indirect_vertex_array.c
+++ b/src/glx/x11/indirect_vertex_array.c
@@ -382,13 +382,14 @@ allocate_array_info_cache( struct array_state_vector * arrays,
{
#define MAX_HEADER_SIZE 20
if ( arrays->array_info_cache_buffer_size < required_size ) {
- GLubyte * temp = realloc( arrays->array_info_cache, required_size
- + MAX_HEADER_SIZE );
+ GLubyte * temp = realloc( arrays->array_info_cache_base,
+ required_size + MAX_HEADER_SIZE );
if ( temp == NULL ) {
return GL_FALSE;
}
+ arrays->array_info_cache_base = temp;
arrays->array_info_cache = temp + MAX_HEADER_SIZE;
arrays->array_info_cache_buffer_size = required_size;
}