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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-02 22:23:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-02 22:23:08 +0400
commite9c935caa0b58d31cad19ca237a55fac8a2c6410 (patch)
tree09762f067aaa42cc908b3fc38ca398ac9f5538eb /source/blender/bmesh/intern/bmesh_mesh.c
parentcc8e2d12a72fafa8758a8d46091afab23a47c271 (diff)
fix bug [#30426] crash in bmesh python api.
if blender freed the BMesh before python was finished (on exit editmode for eg), python would attempt to access the bmesh to clear python pointers in it.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 92ee2221b6e..944b3b434c7 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -154,6 +154,13 @@ void BM_mesh_data_free(BMesh *bm)
BLI_freelistN(&bm->selected);
+ if (bm->py_handle) {
+ extern void bpy_bm_generic_invalidate(void *self);
+
+ bpy_bm_generic_invalidate(bm->py_handle);
+ bm->py_handle = NULL;
+ }
+
BMO_error_clear(bm);
}