Fix Windows build problems.
[mesa.git] / src / glx / x11 / indirect_vertex_array.c
index d4e6ab99ca99fe2591f26402cac96f71d6b686ef..62a101e665616c264e96b4e61b740a6c7bdd50e0 100644 (file)
@@ -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;
     }