From 9e249b06137bcadcc487be03340be12c369026b4 Mon Sep 17 00:00:00 2001 From: Ben Olden-Cooligan Date: Sat, 5 Oct 2024 11:04:03 -0700 Subject: [PATCH] Fix undisposed timer --- NAPS2.Lib.WinForms/WinForms/DragScrollListView.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NAPS2.Lib.WinForms/WinForms/DragScrollListView.cs b/NAPS2.Lib.WinForms/WinForms/DragScrollListView.cs index acd6c2e633..0b8b1aa1d8 100644 --- a/NAPS2.Lib.WinForms/WinForms/DragScrollListView.cs +++ b/NAPS2.Lib.WinForms/WinForms/DragScrollListView.cs @@ -22,6 +22,7 @@ public DragScrollListView() _tmrLvScroll = new Timer(components); SuspendLayout(); _tmrLvScroll.Tick += tmrLVScroll_Tick; + HandleDestroyed += (_, _) => _tmrLvScroll.Dispose(); DragOver += ListViewBase_DragOver; ResumeLayout(false); }