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:
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index c603acac9b4..2c9512792fa 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -200,7 +200,7 @@ int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject
return -1;
}
- self->sa->py_sa = (PyObject *) self;
+ self->borrowed = 0;
return 0;
@@ -208,7 +208,7 @@ int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject
void StrokeAttribute___dealloc__(BPy_StrokeAttribute* self)
{
- if( self->sa && self->sa->py_sa )
+ if( self->sa && !self->borrowed )
delete self->sa;
self->ob_type->tp_free((PyObject*)self);
}