From fcd585963f4532b2a7096b9f671ee958b2ba62ec Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 17 Jun 2021 13:44:02 +0200 Subject: [PATCH] Check if there is a global stack when discard/keep dialog closes When we close Cura, we now remove the global stack first. If the discard/keep dialog closes as a result of closing Cura, this would crash since there is no global stack any more to discard changes from or keep changes in, and we can't access the extruder stacks either. So if there's no global stack, just skip this. It'll be as if you selected 'keep'. Fixes Sentry issue CURA-2ET. --- cura/CuraApplication.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 56b86c9de0..c8570c33e6 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -708,6 +708,8 @@ class CuraApplication(QtApplication): @pyqtSlot(str) def discardOrKeepProfileChangesClosed(self, option: str) -> None: global_stack = self.getGlobalContainerStack() + if global_stack is None: + return if option == "discard": for extruder in global_stack.extruderList: extruder.userChanges.clear()