From f5f0ffe7a0d548a211de67b9da349a2c60c1540d Mon Sep 17 00:00:00 2001 From: ZeqMacaw Date: Sun, 27 Oct 2019 14:15:41 -0400 Subject: [PATCH] FIXED: Closing Crowbar raises exception and writes to unhandled-exception log. --- .../Main Tabs/DownloadUserControl.Designer.vb | 17 ++++++++--- .../Widgets/Main Tabs/DownloadUserControl.vb | 28 +++++++++---------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/Crowbar/Widgets/Main Tabs/DownloadUserControl.Designer.vb b/Crowbar/Widgets/Main Tabs/DownloadUserControl.Designer.vb index 256b694..711ec2c 100644 --- a/Crowbar/Widgets/Main Tabs/DownloadUserControl.Designer.vb +++ b/Crowbar/Widgets/Main Tabs/DownloadUserControl.Designer.vb @@ -5,10 +5,19 @@ Partial Class DownloadUserControl 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ + 'Form overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Me.ItemIdTextBox = New Crowbar.TextBoxEx() diff --git a/Crowbar/Widgets/Main Tabs/DownloadUserControl.vb b/Crowbar/Widgets/Main Tabs/DownloadUserControl.vb index 0c72cf5..e92bd20 100644 --- a/Crowbar/Widgets/Main Tabs/DownloadUserControl.vb +++ b/Crowbar/Widgets/Main Tabs/DownloadUserControl.vb @@ -18,20 +18,20 @@ Public Class DownloadUserControl InitializeComponent() End Sub - 'UserControl overrides dispose to clean up the component list. - - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing Then - Me.Free() - If components IsNot Nothing Then - components.Dispose() - End If - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub + ''UserControl overrides dispose to clean up the component list. + ' + 'Protected Overrides Sub Dispose(ByVal disposing As Boolean) + ' Try + ' If disposing Then + ' Me.Free() + ' If components IsNot Nothing Then + ' components.Dispose() + ' End If + ' End If + ' Finally + ' MyBase.Dispose(disposing) + ' End Try + 'End Sub #End Region