diff --git a/MatterControlLib/ApplicationView/Config/PrinterConfig.cs b/MatterControlLib/ApplicationView/Config/PrinterConfig.cs index 3472dcfe3..a12aa3f14 100644 --- a/MatterControlLib/ApplicationView/Config/PrinterConfig.cs +++ b/MatterControlLib/ApplicationView/Config/PrinterConfig.cs @@ -79,8 +79,11 @@ namespace MatterHackers.MatterControl var scene = Bed?.Scene; if (scene != null) { + var undoBuffer = scene.UndoBuffer; + if (sceneOverrides != null - && undoBufferHashCode == scene.UndoBuffer.GetLongHashCode()) + && undoBuffer != null + && undoBufferHashCode == undoBuffer.GetLongHashCode()) { return sceneOverrides; } @@ -162,7 +165,10 @@ namespace MatterHackers.MatterControl } // return the current set - undoBufferHashCode = scene.UndoBuffer.GetLongHashCode(); + if (undoBuffer != null) + { + undoBufferHashCode = undoBuffer.GetLongHashCode(); + } return sceneOverrides; }