Guard for null at startup
This commit is contained in:
parent
a7f0c1f7ab
commit
c49f43abf3
1 changed files with 5 additions and 2 deletions
|
|
@ -534,8 +534,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
// When GCode changes, switch to the 3D layer view
|
||||
printer.ViewState.ViewMode = PartViewMode.Layers3D;
|
||||
|
||||
// HACK: directly fire method which previously ran on SlicingDone event on PrintItemWrapper
|
||||
UiThread.RunOnIdle(() => printerTabPage.gcode3DWidget.CreateAndAddChildren(printer));
|
||||
if (printerTabPage.gcode3DWidget != null)
|
||||
{
|
||||
// HACK: directly fire method which previously ran on SlicingDone event on PrintItemWrapper
|
||||
UiThread.RunOnIdle(() => printerTabPage.gcode3DWidget.CreateAndAddChildren(printer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue