Skip to content

Commit

Permalink
null-check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorium committed Jul 8, 2024
1 parent c6325de commit 4354198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Giraffe.ViewEngine/StringBuilderPool.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type public StringBuilderPool =
let lifetime = DateTimeOffset.Now - StringBuilderPool.created
let expired = lifetime > PoolLimits.MaximumLifetime
let sb = StringBuilderPool.instance
if not expired && sb <> null then
if not expired && not (isNull sb) then
StringBuilderPool.instance <- null
sb.Clear()
else new StringBuilder(PoolLimits.MinimumCapacity)
Expand Down

0 comments on commit 4354198

Please sign in to comment.