Resolved minor bug that would occassionaly create unnecessary exceptions

This commit is contained in:
David Sparer
2016-10-03 09:19:57 -06:00
parent 41cd6f4290
commit 6582ebcf57

View File

@@ -469,7 +469,7 @@ namespace mRemoteNG.UI.Window
case NotifyCollectionChangedAction.Add:
var childList = senderAsContainerInfo?.Children;
ConnectionInfo otherChild = null;
if (childList?.Count > 0)
if (childList?.Count > 1)
try { otherChild = childList.First(child => !args.NewItems.Contains(child)); } catch { }
RefreshTreeObject(otherChild ?? senderAsContainerInfo);
break;