Fix T50029: BVHTree.FromPolygons memory leak
This commit is contained in:
parent
9bea39c474
commit
3b467b35a8
Notes:
blender-bot
2023-02-14 19:43:12 +01:00
Referenced by issue blender/blender-addons#50029, mathutils.bvhtree.BVHTree.FromPolygons Huge Memory Leak
|
@ -817,13 +817,14 @@ static PyObject *C_BVHTree_FromPolygons(PyObject *UNUSED(cls), PyObject *args, P
|
|||
PyErr_Format(PyExc_ValueError,
|
||||
"%s: index %d must be less than %d",
|
||||
error_prefix, plink->poly[j], coords_len);
|
||||
|
||||
Py_DECREF(py_tricoords_fast);
|
||||
/* decref below */
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Py_DECREF(py_tricoords_fast);
|
||||
|
||||
if (py_tricoords_len >= 3) {
|
||||
tris_len += (py_tricoords_len - 2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue