From 8c0e21f0d58549b645cbd5e5823acdfee0c44781 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 3 Sep 2020 17:52:44 +0200 Subject: [PATCH] Don't crash if mesh loading fails Some plug-ins (like the OBJReader) return None then. Fixes Sentry issue CURA-14P. --- cura/CuraApplication.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 0446400362..434841160c 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -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]