Skip to content

Commit

Permalink
Fix potential NullReferenceException
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmair authored and terrajobst committed Mar 18, 2024
1 parent 02997ff commit a66f07e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/NQuery/Symbols/Aggregation/ConcatAggregateDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public void Accumulate(object value)
if (value is null)
return;

var strValue = Convert.ToString(value, CultureInfo.InvariantCulture).Trim();
var strValue = Convert.ToString(value, CultureInfo.InvariantCulture);

if (strValue is null)
return;

strValue = strValue.Trim();

if (_valueList.Contains(strValue))
return;
Expand Down

0 comments on commit a66f07e

Please sign in to comment.