Skip to content

Commit

Permalink
[BugFix] Check input is not null before trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding-Enthusiast committed May 15, 2024
1 parent f9a2cb2 commit 0763670
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/FinderOuter/ViewModels/MissingBase58ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private void AddNumber()
public IReactiveCommand AddSimilarCommand { get; }
private void AddSimilar()
{
ToAdd = ToAdd.Trim();
ToAdd = ToAdd?.Trim();
if (!string.IsNullOrEmpty(ToAdd) && ToAdd.Length == 1)
{
// Characters outside of Base58 charset are accepted here
Expand Down Expand Up @@ -194,7 +194,7 @@ private void AddSimilar()
public IReactiveCommand AddExactCommand { get; }
private void AddExact()
{
ToAdd = ToAdd.Trim();
ToAdd = ToAdd?.Trim();
if (!string.IsNullOrEmpty(ToAdd) && ToAdd.Length == 1 && B58SearchSpace.AllChars.Contains(ToAdd[0]))
{
if (!CurrentItems.Contains(ToAdd))
Expand Down

0 comments on commit 0763670

Please sign in to comment.