Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 2f99c57

Browse files
Kaim, Sean MKaim, Sean M
authored andcommitted
Fix for #16: right click connection tab causes crash
Fixes #16 Need to dispose of items the external app list before adding the new ones. This likely also caused a memory leak.
1 parent eac4ea0 commit 2f99c57

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

mRemoteV1/UI/UI.Window.Connection.vb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,14 @@ Namespace UI
753753
Private Sub AddExternalApps()
754754
Try
755755
'clean up
756-
cmenTabExternalApps.DropDownItems.Clear()
756+
'since new items are added below, we have to dispose of any previous items first
757+
If cmenTabExternalApps.DropDownItems.Count > 0 Then
758+
For Each mitem As ToolStripMenuItem In cmenTabExternalApps.DropDownItems
759+
mitem.Dispose()
760+
Next mitem
761+
cmenTabExternalApps.DropDownItems.Clear()
762+
End If
763+
757764

758765
'add ext apps
759766
For Each extA As Tools.ExternalTool In Runtime.ExternalTools

0 commit comments

Comments
 (0)