Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-31 03:55:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-31 03:55:28 +0300
commit756d1502e49c93984e5453f15b6384b119605695 (patch)
treedbd2c23d290e5035fd12d9fb1aea4a423292e2cd /source/blender/python/gpu
parent9c23e245432bb019dd47bfa0fcffd95638fd5ada (diff)
Fix missing error returns in batch API
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r--source/blender/python/gpu/gpu_py_batch.c2
1 files changed, 2 insertions, 0 deletions
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;