diff --git a/ide/vs2019/mimalloc-override-test.vcxproj b/ide/vs2019/mimalloc-override-test.vcxproj
index a2497a1..7a9202f 100644
--- a/ide/vs2019/mimalloc-override-test.vcxproj
+++ b/ide/vs2019/mimalloc-override-test.vcxproj
@@ -176,14 +176,14 @@
+
+
+
{abb5eae7-b3e6-432e-b636-333449892ea7}
-
-
-
diff --git a/src/segment.c b/src/segment.c
index 55410f5..8aa838a 100644
--- a/src/segment.c
+++ b/src/segment.c
@@ -1290,7 +1290,7 @@ void _mi_segment_huge_page_free(mi_segment_t* segment, mi_page_t* page, mi_block
mi_assert_internal(mi_atomic_read_relaxed(&segment->thread_id)==0);
// claim it and free
- mi_heap_t* heap = mi_get_default_heap();
+ mi_heap_t* heap = mi_heap_get_default(); // issue #221; don't use the internal get_default_heap as we need to ensure the thread is initialized.
// paranoia: if this it the last reference, the cas should always succeed
if (mi_atomic_cas_strong(&segment->thread_id, heap->thread_id, 0)) {
mi_block_set_next(page, block, page->free);
diff --git a/test/main-override.cpp b/test/main-override.cpp
index 734e4c9..eda32ae 100644
--- a/test/main-override.cpp
+++ b/test/main-override.cpp
@@ -29,10 +29,12 @@ void various_tests();
int main() {
mi_stats_reset(); // ignore earlier allocations
heap_thread_free_large();
+ /*
heap_no_delete();
heap_late_free();
padding_shrink();
various_tests();
+ */
mi_stats_print(NULL);
return 0;
}