Skip to content

Commit 423bd5c

Browse files
committed
Fixed crash when right clicking on two contacts in a row
1 parent 5c08c62 commit 423bd5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MainWindow.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,12 @@ private void btnAccountAdd_Click(object sender, RoutedEventArgs e) {
894894
private void ContactSearchConextMenu_OnOpened(object sender, RoutedEventArgs e) {
895895
ContextMenu menu = sender as ContextMenu;
896896
menu.Items.Clear();
897-
foreach (var item in ContactPluginManager.ContactMenuItems)
897+
foreach (var item in ContactPluginManager.ContactMenuItems){
898+
var old_menu = item.Parent as ContextMenu;
899+
if (old_menu != null)
900+
old_menu.Items.Remove(item);
898901
menu.Items.Add(item);
902+
}
899903

900904

901905
}

0 commit comments

Comments
 (0)