Fix T68135: Empty curve object crashes export (STL exporter part).

This commit is contained in:
Bastien Montagne 2019-08-02 18:23:57 +02:00
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
1 changed files with 3 additions and 0 deletions

View File

@ -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)