mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix crash when adding USB device before global stack is created
Like when you plug in a 3D printer via USB while still in the welcome screen. Fixes Sentry issue CURA-1ZR.
This commit is contained in:
parent
1f9b4c3964
commit
bcf180985d
1 changed files with 2 additions and 0 deletions
|
@ -211,6 +211,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
|
||||
def _onGlobalContainerStackChanged(self):
|
||||
container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if container_stack is None:
|
||||
return
|
||||
num_extruders = container_stack.getProperty("machine_extruder_count", "value")
|
||||
# Ensure that a printer is created.
|
||||
controller = GenericOutputController(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue