Skip to content

Commit d71ffbe

Browse files
committed
Fixed a bag with the tracking allocator.
1 parent 5a0d288 commit d71ffbe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/joka/memory.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ version (JokaCustomMemory) {
116116
extern(C) @nogc
117117
void jokaFree(void* ptr, IStr file = __FILE__, Sz line = __LINE__) {
118118
static if (isTrackingMemory) {
119+
if (ptr == null) return;
119120
if (auto mallocValue = ptr in _memoryTrackingState.table) {
120121
stdc.free(ptr);
121122
debug {

0 commit comments

Comments
 (0)