diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-08 13:13:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-08 13:13:59 +0300 |
commit | c35db522dae8622de9ce10316feae08361769621 (patch) | |
tree | 4eeab45e1f7179ee3faea79cb6aced2191791df2 /source/blender/gpu/intern/gpu_buffers.c | |
parent | c2d133a9fc33da146206f57df2e9dbe2b141114d (diff) |
variable 'pool' could be accessed as NULL, globalPool was allocated but not assigned before use.
also remove unused vars.
Diffstat (limited to 'source/blender/gpu/intern/gpu_buffers.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index ac7598a642f..f7ca1c5bfe0 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -242,7 +242,7 @@ void GPU_buffer_free( GPUBuffer *buffer, GPUBufferPool *pool ) if( pool == 0 ) pool = globalPool; if( pool == 0 ) - globalPool = GPU_buffer_pool_new(); + pool = globalPool = GPU_buffer_pool_new(); /* free the last used buffer in the queue if no more space, but only if we are in the main thread. for e.g. rendering or baking it can @@ -269,7 +269,6 @@ void GPU_buffer_free( GPUBuffer *buffer, GPUBufferPool *pool ) GPUDrawObject *GPU_drawobject_new( DerivedMesh *dm ) { GPUDrawObject *object; - MVert *mvert; MFace *mface; int numverts[32768]; /* material number is an 16-bit short so there's at most 32768 materials */ int redir[32768]; /* material number is an 16-bit short so there's at most 32768 materials */ @@ -291,7 +290,6 @@ GPUDrawObject *GPU_drawobject_new( DerivedMesh *dm ) /*object->legacy = 1;*/ memset(numverts,0,sizeof(int)*32768); - mvert = dm->getVertArray(dm); mface = dm->getFaceArray(dm); numfaces= dm->getNumFaces(dm); @@ -1116,14 +1114,12 @@ void GPU_buffer_copy_edge(DerivedMesh *dm, float *varray, int *UNUSED(index), in { int i; - MVert *mvert; MEdge *medge; unsigned int *varray_ = (unsigned int *)varray; int numedges; DEBUG_VBO("GPU_buffer_copy_edge\n"); - mvert = dm->getVertArray(dm); medge = dm->getEdgeArray(dm); numedges= dm->getNumEdges(dm); |