Fix T68135: Empty curve object crashes export (STL exporter part).
This commit is contained in:
parent
4e1cda9885
commit
6f0585fa4a
Notes:
blender-bot
2023-02-14 01:24:36 +01:00
Referenced by issue blender/blender#68135, Empty curve object crashes export
|
@ -87,10 +87,13 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
|
|||
else:
|
||||
mesh_owner = ob
|
||||
|
||||
# Object.to_mesh() is not guaranteed to return a mesh.
|
||||
try:
|
||||
mesh = mesh_owner.to_mesh()
|
||||
except RuntimeError:
|
||||
return
|
||||
if mesh is None:
|
||||
return
|
||||
|
||||
mat = global_matrix @ ob.matrix_world
|
||||
mesh.transform(mat)
|
||||
|
|
Loading…
Reference in New Issue