Fix object align crash (use-after-free)

This commit is contained in:
Campbell Barton 2015-06-03 13:40:00 +10:00
parent 4056253627
commit c07a11b83b
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,6 @@ def GlobalBB_HQ(obj):
me = obj.to_mesh(scene=bpy.context.scene, apply_modifiers=True, settings='PREVIEW')
verts = me.vertices
bpy.data.meshes.remove(me)
val = matrix_world * verts[-1].co
@ -113,6 +112,8 @@ def GlobalBB_HQ(obj):
if val > up:
up = val
bpy.data.meshes.remove(me)
return Vector((left, front, up)), Vector((right, back, down))