glTF exporter: Fix crash when mesh is not created, without crash

This commit is contained in:
Julien Duroure 2021-05-17 20:28:25 +02:00
parent 0d6c7d275a
commit f172f77247
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (1, 6, 14),
"version": (1, 6, 15),
'blender': (2, 91, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -357,6 +357,10 @@ def __gather_mesh_from_nonmesh(blender_object, library, export_settings):
blender_mesh_owner = blender_object
blender_mesh = blender_mesh_owner.to_mesh()
# In some cases (for example curve with single vertice), no blender_mesh is created (without crash)
if blender_mesh is None:
return None
except Exception:
return None