STL: fix T72145 crash exporting object without data

This commit is contained in:
Mikhail Rachinskiy 2019-12-04 08:46:23 +04:00 committed by Sergey Sharybin
parent ed5b81f501
commit 2d192b4005
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,8 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
"""
# get the editmode data
ob.update_from_editmode()
if ob.mode == "EDIT":
ob.update_from_editmode()
# get the modifiers
if use_mesh_modifiers:
@ -92,6 +93,7 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
mesh = mesh_owner.to_mesh()
except RuntimeError:
return
if mesh is None:
return