STL: fix T72145 crash exporting object without data
This commit is contained in:
parent
5f1ad50707
commit
2f425cc128
Notes:
blender-bot
2023-02-14 19:04:24 +01:00
Referenced by commit 14420434: Revert "STL: fix T72145 crash exporting object without data"
Referenced by commit 14420434
, Revert "STL: fix T72145 crash exporting object without data"
Referenced by issue #72145, Import-Export STL Format Hard Crash
|
@ -80,7 +80,8 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
|
|||
import bpy
|
||||
|
||||
# get the editmode data
|
||||
ob.update_from_editmode()
|
||||
if ob.mode == "EDIT":
|
||||
ob.update_from_editmode()
|
||||
|
||||
# get the modifiers
|
||||
if use_mesh_modifiers:
|
||||
|
@ -94,6 +95,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
|
||||
|
||||
|
|
Loading…
Reference in New Issue