Fix possible null reference
This commit is contained in:
parent
496be90eb8
commit
67aae1178b
@ -231,11 +231,12 @@ public class ReCodeItRemapper
|
|||||||
if (remap.TypeCandidates.Count == 0 || remap.Succeeded) { return; }
|
if (remap.TypeCandidates.Count == 0 || remap.Succeeded) { return; }
|
||||||
|
|
||||||
var winner = remap.TypeCandidates.FirstOrDefault();
|
var winner = remap.TypeCandidates.FirstOrDefault();
|
||||||
remap.TypePrimeCandidate = winner;
|
|
||||||
remap.OriginalTypeName = winner.Name.String;
|
|
||||||
|
|
||||||
if (winner is null) { return; }
|
if (winner is null) { return; }
|
||||||
|
|
||||||
|
remap.TypePrimeCandidate = winner;
|
||||||
|
remap.OriginalTypeName = winner.Name.String;
|
||||||
|
|
||||||
if (_alreadyGivenNames.Contains(winner.FullName))
|
if (_alreadyGivenNames.Contains(winner.FullName))
|
||||||
{
|
{
|
||||||
remap.NoMatchReasons.Add(ENoMatchReason.AmbiguousWithPreviousMatch);
|
remap.NoMatchReasons.Add(ENoMatchReason.AmbiguousWithPreviousMatch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user