[Bf-blender-cvs] [756d1502e49] blender2.8: Fix missing error returns in batch API

Campbell Barton noreply at git.blender.org
Wed Oct 31 02:03:11 CET 2018


Commit: 756d1502e49c93984e5453f15b6384b119605695
Author: Campbell Barton
Date:   Wed Oct 31 11:55:28 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB756d1502e49c93984e5453f15b6384b119605695

Fix missing error returns in batch API

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

M	source/blender/python/gpu/gpu_py_batch.c

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

diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index 54574bda1f4..ecf3bb6cb60 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -207,6 +207,7 @@ static PyObject *bpygpu_VertBatch_program_use_begin(BPyGPUBatch *self)
 	if (!glIsProgram(self->batch->program)) {
 		PyErr_SetString(PyExc_RuntimeError,
 		                "batch does not have any program assigned to it");
+		return NULL;
 	}
 	GPU_batch_program_use_begin(self->batch);
 	Py_RETURN_NONE;
@@ -217,6 +218,7 @@ static PyObject *bpygpu_VertBatch_program_use_end(BPyGPUBatch *self)
 	if (!glIsProgram(self->batch->program)) {
 		PyErr_SetString(PyExc_RuntimeError,
 		                "batch does not have any program assigned to it");
+		return NULL;
 	}
 	GPU_batch_program_use_end(self->batch);
 	Py_RETURN_NONE;



More information about the Bf-blender-cvs mailing list