fix [#27071] Random crashes when altering a mesh vertex vector in BGE
[blender.git] / source / gameengine / Ketsji / KX_VertexProxy.cpp
index 5589d35f44a3a9bcf699828d0e2a51a52e0d0624..e92351ad11099bf2f003398892bfd0fd3f12ecbd 100644 (file)
@@ -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());
 }