diff options
-rw-r--r-- | source/blender/python/gpu/gpu_py_batch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c index 4e6df73a2d9..2a4868d61d0 100644 --- a/source/blender/python/gpu/gpu_py_batch.c +++ b/source/blender/python/gpu/gpu_py_batch.c @@ -170,6 +170,11 @@ static PyObject *bpygpu_VertBatch_program_set(BPyGPUBatch *self, BPyGPUShader *p GPU_shader_get_program(shader), GPU_shader_get_interface(shader)); +#ifdef USE_GPU_PY_REFERENCES + /* Hold user */ + PyList_Append(self->references, (PyObject *)py_shader); +#endif + Py_RETURN_NONE; } |