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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-05-22 03:11:25 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-05-22 03:11:25 +0400
commit7808adbf0c3ca832dd3e76b2b67310839d48f8c2 (patch)
treef7c7ba0288a89b3210d15150cf996fe182161648 /source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
parent6fd12c5310e70fad1564d5b040b9bb952cd14eb1 (diff)
Fix for a crash due to de-referencing of a StrokeVertex Python wrapper object.
Problem report by flokkievids in the BA Freestyle thread, thanks!
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 37a29908469..883dba4a31c 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -186,6 +186,7 @@ static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject
{
return NULL;
}
+ ((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed = 1; /* make the wrapped StrokeVertex internal */
StrokeVertex *sv = ((BPy_StrokeVertex *)py_sv)->sv;
StrokeInternal::StrokeVertexIterator sv_it(*(((BPy_StrokeVertexIterator *)py_sv_it)->sv_it));
self->s->InsertVertex(sv, sv_it);