fix [#27071] Random crashes when altering a mesh vertex vector in BGE

thanks to Chris Holland (topher77) for supplying the fix.
This commit is contained in:
Campbell Barton 2011-10-06 16:07:05 +00:00
parent b871618116
commit 1f90b42999

@ -436,10 +436,14 @@ KX_VertexProxy::KX_VertexProxy(KX_MeshProxy*mesh, RAS_TexVert* vertex)
: m_vertex(vertex), : m_vertex(vertex),
m_mesh(mesh) m_mesh(mesh)
{ {
/* see bug [#27071] */
Py_INCREF(m_mesh->GetProxy());
} }
KX_VertexProxy::~KX_VertexProxy() KX_VertexProxy::~KX_VertexProxy()
{ {
/* see bug [#27071] */
Py_DECREF(m_mesh->GetProxy());
} }