[Bf-blender-cvs] [137f557] master: Remove NULL checking variable after using it.

Antony Riakiotakis noreply at git.blender.org
Tue Dec 16 12:10:20 CET 2014


Commit: 137f55724606e07f1cdc829c730fc0c061d7af21
Author: Antony Riakiotakis
Date:   Tue Dec 16 12:09:24 2014 +0100
Branches: master
https://developer.blender.org/rB137f55724606e07f1cdc829c730fc0c061d7af21

Remove NULL checking variable after using it.

===================================================================

M	source/blender/gpu/intern/gpu_buffers.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 2ac2ca3..dcde0e9 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1420,11 +1420,9 @@ void *GPU_buffer_lock_stream(GPUBuffer *buffer)
 void GPU_buffer_unlock(GPUBuffer *buffer)
 {
 	if (buffer->use_vbo) {
-		if (buffer) {
-			/* note: this operation can fail, could return
-			 * an error code from this function? */
-			glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
-		}
+		/* note: this operation can fail, could return
+		 * an error code from this function? */
+		glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
 		glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
 	}
 }




More information about the Bf-blender-cvs mailing list