Add null check for English name
This commit is contained in:
parent
08d37eb6de
commit
f47c6505ab
2 changed files with 3 additions and 3 deletions
|
|
@ -2544,7 +2544,7 @@ namespace TShockAPI
|
|||
break;
|
||||
}
|
||||
if (npc.FullName.ToLowerInvariant().StartsWith(npcStr.ToLowerInvariant()) ||
|
||||
englishName.StartsWith(npcStr, StringComparison.InvariantCultureIgnoreCase))
|
||||
englishName?.StartsWith(npcStr, StringComparison.InvariantCultureIgnoreCase) == true)
|
||||
matches.Add(npc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue