diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2022-12-10 16:21:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 16:21:43 +0100 |
commit | b59c657be3e9049f936c0c6cc6083a41a343737a (patch) | |
tree | fe9d722d6493e59eba913c67a2c3e6a7d0ff3364 /lib/system | |
parent | 2ebd71bfd42730c8881830ee535b2cd2519fd92d (diff) | |
download | Nim-b59c657be3e9049f936c0c6cc6083a41a343737a.tar.gz |
fixes #21062 (#21068)
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/alloc.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index 9c8f70c11..a7db3704b 100644 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -787,8 +787,9 @@ when defined(gcDestructors): while it != nil: if maxIters == 0: let rest = it.next.loada - it.next.storea nil - addToSharedFreeList(c, rest) + if rest != nil: + it.next.storea nil + addToSharedFreeList(c, rest) break inc x, size it = it.next.loada |