From 4579b06f6d2ffb6129572227b27cb687661a4fef Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 4 Oct 2019 15:10:42 +0200 Subject: [PATCH] Fix typing --- cura/Machines/Models/IntentModel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/Machines/Models/IntentModel.py b/cura/Machines/Models/IntentModel.py index 28713f0c00..25edc0a759 100644 --- a/cura/Machines/Models/IntentModel.py +++ b/cura/Machines/Models/IntentModel.py @@ -94,6 +94,9 @@ class IntentModel(ListModel): ## Get the active materials for all extruders. No duplicates will be returned def _get_active_materials(self) -> Set[MaterialNode]: global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() + if global_stack is None: + return set() + container_tree = ContainerTree.getInstance() machine_node = container_tree.machines[global_stack.definition.getId()] nodes = set() # type: Set[MaterialNode]