Don't crash if mesh loading fails

Some plug-ins (like the OBJReader) return None then.

Fixes Sentry issue CURA-14P.
This commit is contained in:
Ghostkeeper 2020-09-03 17:52:44 +02:00
parent 0b22b94950
commit 8c0e21f0d5
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -1799,6 +1799,9 @@ class CuraApplication(QtApplication):
return
nodes = job.getResult()
if nodes is None:
Logger.error("Read mesh job returned None. Mesh loading must have failed.")
return
file_name = job.getFileName()
file_name_lower = file_name.lower()
file_extension = file_name_lower.split(".")[-1]