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) <noreply@anthropic.com>
This commit is contained in:
2026-03-20 14:43:51 -04:00
parent ae88c34361
commit 2d1f2217e5

View File

@@ -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();