From 2d1f2217e506b7cd116b712e2ce4dd32d7fc012f Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Fri, 20 Mar 2026 14:43:51 -0400 Subject: [PATCH] fix: guard IsHandleCreated in EditNestForm timer Prevent InvalidOperationException when the timer fires before or after the control handle is available. Co-Authored-By: Claude Opus 4.6 (1M context) --- OpenNest/Forms/EditNestForm.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenNest/Forms/EditNestForm.cs b/OpenNest/Forms/EditNestForm.cs index 8d39961..3f01578 100644 --- a/OpenNest/Forms/EditNestForm.cs +++ b/OpenNest/Forms/EditNestForm.cs @@ -774,6 +774,9 @@ namespace OpenNest.Forms private void drawingListUpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { + if (!drawingListBox1.IsHandleCreated) + return; + drawingListBox1.Invoke(new MethodInvoker(() => { drawingListBox1.Refresh();