From 1f90b4299982c3d6e7a8e839bf035b717b9a58d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Oct 2011 16:07:05 +0000 Subject: fix [#27071] Random crashes when altering a mesh vertex vector in BGE thanks to Chris Holland (topher77) for supplying the fix. --- source/gameengine/Ketsji/KX_VertexProxy.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index 5589d35f44a..e92351ad110 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -436,10 +436,14 @@ KX_VertexProxy::KX_VertexProxy(KX_MeshProxy*mesh, RAS_TexVert* vertex) : m_vertex(vertex), m_mesh(mesh) { + /* see bug [#27071] */ + Py_INCREF(m_mesh->GetProxy()); } KX_VertexProxy::~KX_VertexProxy() { + /* see bug [#27071] */ + Py_DECREF(m_mesh->GetProxy()); } -- cgit v1.2.3