GPU_buffer_setup could return a freed buffer. (when VBO's were used)

This commit is contained in:
Campbell Barton
2010-01-16 17:47:56 +00:00
parent 70060b2936
commit 083e5b66a9

View File

@@ -772,6 +772,7 @@ GPUBuffer *GPU_buffer_setup( DerivedMesh *dm, GPUDrawObject *object, int size, G
DEBUG_VBO( "Failed to map buffer to client address space\n" );
GPU_buffer_free( buffer, globalPool );
GPU_buffer_pool_delete_last( globalPool );
buffer= NULL;
if( globalPool->size > 0 ) {
GPU_buffer_pool_delete_last( globalPool );
buffer = GPU_buffer_alloc( size, globalPool );