Fix possible hang on buffer allocation failure. Reported by coverity

scan, thanks...errr.
This commit is contained in:
Antony Riakiotakis
2015-11-28 09:29:57 +01:00
parent c5ac037c8e
commit 96cff85610

View File

@@ -525,6 +525,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
if (!(buffer && (varray = glMapBuffer(target, GL_WRITE_ONLY)))) {
if (buffer)
gpu_buffer_free_intern(buffer);
BLI_mutex_unlock(&buffer_mutex);
return NULL;
}
}