Skip to content

Commit

Permalink
Make Array destructor work on default init state (#17081)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilsonator authored Nov 24, 2024
1 parent 9ac27a8 commit 726b9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dmd/root/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public:
~this() pure nothrow
{
debug (stomp) memset(data.ptr, 0xFF, data.length);
if (data.ptr != &smallarray[0])
if (data.ptr && data.ptr != &smallarray[0])
mem.xfree(data.ptr);
}
///returns elements comma separated in []
Expand Down

0 comments on commit 726b9bb

Please sign in to comment.