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>2021-03-04 07:06:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-04 07:18:10 +0300
commita40ccde405211b82eed8259b1afaa43dc41fa6a6 (patch)
tree6a65dcdea743f72308bc54a80678461cd9242e84 /source/blender/python/gpu/gpu_py_buffer.c
parent0d28e2a334a10d75c2c10054dddefabfc8766840 (diff)
Fix logic for calling PyObject_GC_UnTrack
All tracked objects need a matching un-track, also remove redundant Py_XDECREF call.
Diffstat (limited to 'source/blender/python/gpu/gpu_py_buffer.c')
-rw-r--r--source/blender/python/gpu/gpu_py_buffer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/python/gpu/gpu_py_buffer.c b/source/blender/python/gpu/gpu_py_buffer.c
index b89d2c6a69f..420a7873517 100644
--- a/source/blender/python/gpu/gpu_py_buffer.c
+++ b/source/blender/python/gpu/gpu_py_buffer.c
@@ -202,8 +202,7 @@ static void pygpu_buffer__tp_dealloc(BPyGPUBuffer *self)
{
if (self->parent) {
PyObject_GC_UnTrack(self);
- pygpu_buffer__tp_clear(self);
- Py_XDECREF(self->parent);
+ Py_CLEAR(self->parent);
}
else {
MEM_freeN(self->buf.as_void);