Skip to content

Commit 6d716c9

Browse files
committed
More precise catch in SetControlProperty
1 parent 325773f commit 6d716c9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

UI/Components/AutoSplitIntegrationComponentSettings.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ private void SetControlProperty<T>(Control control, string propertyName, T value
4848
setProperty();
4949
}
5050

51-
catch { }
51+
// Control was disposed or its handle destroyed mid-update (e.g. AutoSplit
52+
// process events firing while the layout is being torn down on shutdown).
53+
catch (ObjectDisposedException) { }
54+
catch (InvalidOperationException) { }
5255
}
5356

5457
internal AutoSplitIntegrationComponentSettings(AutoSplitIntegrationComponent component)

0 commit comments

Comments
 (0)