Skip to content

Commit 3079f21

Browse files
committed
Add additional checks to ensure that selection is valid
1 parent 8695c05 commit 3079f21

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesWindow.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ private void ListView_SynchronizeCurrentSelection_OnGotFocus(object sender, Rout
2121
UpdateCurrentSelection((Selector)sender);
2222

2323
var cs = ViewModel.CurrentSelection;
24-
Description.Text = cs.Description;
25-
Version.Text = cs.Version;
26-
LocaleName.Text = cs.LocaleName;
27-
FullPath.Text = cs.FullPath;
24+
Description.Text = cs?.Description ?? string.Empty;
25+
Version.Text = cs?.Version ?? string.Empty;
26+
LocaleName.Text = cs?.LocaleName ?? string.Empty;
27+
FullPath.Text = cs?.FullPath ?? string.Empty;
2828
}
2929

3030
private void UpdateCurrentSelection(Selector sender)

0 commit comments

Comments
 (0)