diff --git a/PartPreviewWindow/ViewGcodeWidget.cs b/PartPreviewWindow/ViewGcodeWidget.cs index a6a8a3861..f6b5ccf9e 100644 --- a/PartPreviewWindow/ViewGcodeWidget.cs +++ b/PartPreviewWindow/ViewGcodeWidget.cs @@ -508,6 +508,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public override void OnClosed(EventArgs e) { + if (gCodeRenderer != null) + { + gCodeRenderer.Dispose(); + } + if (backgroundWorker != null) { backgroundWorker.CancelAsync(); diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 968ab38ab..e777fc325 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 968ab38ab62bb3ff58e99c404ee6a817f3c46907 +Subproject commit e777fc325ba5e1c11e232bcea7801c007746f82b