Fix nil comparisons for soa slices and dynamic arrays
This commit is contained in:
1 parent
3fd5c3cd85
commit
7fbe0a6f23
4 files changed
+49
-6
No files matched your search
+4
-3
@@ -164,9 +164,10 @@ heap_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
|
||||
return aligned_heap_alloc(size, alignment);
|
||||
|
||||
case .Free:
|
||||
assert(old_memory != nil);
|
||||
ptr := recover_original_pointer(old_memory);
|
||||
heap_free(ptr);
|
||||
if old_memory != nil {
|
||||
ptr := recover_original_pointer(old_memory);
|
||||
heap_free(ptr);
|
||||
}
|
||||
return nil;
|
||||
|
||||
case .Free_All:
|
||||
|
||||
Reference in new issue
Block a user