Skip to content

Commit

Permalink
Fix: Fixed possible crash when entering characters into path bar (fil…
Browse files Browse the repository at this point in the history
  • Loading branch information
hishitetsu authored Apr 12, 2024
1 parent ca59398 commit 98d5e9f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Files.App/ViewModels/UserControls/AddressToolbarViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -956,11 +956,13 @@ public async Task SetAddressBarSuggestionsAsync(AutoSuggestBox sender, IShellPag
return true;
}))
{
NavigationBarSuggestions.Clear();
NavigationBarSuggestions.Add(new NavigationBarSuggestionItem()
{
Text = shellpage.FilesystemViewModel.WorkingDirectory,
PrimaryDisplay = "NavigationToolbarVisiblePathNoResults".GetLocalizedResource()
SafetyExtensions.IgnoreExceptions(() => {
NavigationBarSuggestions.Clear();
NavigationBarSuggestions.Add(new NavigationBarSuggestionItem()
{
Text = shellpage.FilesystemViewModel.WorkingDirectory,
PrimaryDisplay = "NavigationToolbarVisiblePathNoResults".GetLocalizedResource()
});
});
}
}
Expand Down

0 comments on commit 98d5e9f

Please sign in to comment.