Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 5c881b0

Browse files
authored
Merge pull request #1181 from github/fixes/1159-nre-repositorygroupdescription
Allow null items in RepositoryGroupDescription.
2 parents bcdf132 + c25535c commit 5c881b0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCloneControl.xaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ public RepositoryGroupDescription(RepositoryCloneControl owner)
8888

8989
public override object GroupNameFromItem(object item, int level, System.Globalization.CultureInfo culture)
9090
{
91-
Guard.ArgumentNotNull(item, nameof(item));
9291
Guard.ArgumentNotNull(culture, nameof(culture));
9392

9493
var repo = item as IRemoteRepositoryModel;
95-
var name = repo.Owner;
94+
var name = repo?.Owner ?? string.Empty;
9695
RepositoryGroup group;
9796

9897
if (!owner.groups.TryGetValue(name, out group))

0 commit comments

Comments
 (0)