mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-04 10:05:09 +08:00
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.
This commit is contained in:
parent
788efcc83e
commit
fcd585963f
@ -708,6 +708,8 @@ class CuraApplication(QtApplication):
|
|||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def discardOrKeepProfileChangesClosed(self, option: str) -> None:
|
def discardOrKeepProfileChangesClosed(self, option: str) -> None:
|
||||||
global_stack = self.getGlobalContainerStack()
|
global_stack = self.getGlobalContainerStack()
|
||||||
|
if global_stack is None:
|
||||||
|
return
|
||||||
if option == "discard":
|
if option == "discard":
|
||||||
for extruder in global_stack.extruderList:
|
for extruder in global_stack.extruderList:
|
||||||
extruder.userChanges.clear()
|
extruder.userChanges.clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user