fix mi_collect being called with empty heap (issue #150)

This commit is contained in:
daan 2019-09-09 07:54:36 -07:00
parent 7b63bc4211
commit e227341f5b

View File

@ -108,9 +108,8 @@ static bool mi_heap_page_never_delayed_free(mi_heap_t* heap, mi_page_queue_t* pq
static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
{
_mi_deferred_free(heap,collect > NORMAL);
if (!mi_heap_is_initialized(heap)) return;
_mi_deferred_free(heap, collect > NORMAL);
// collect (some) abandoned pages
if (collect >= NORMAL && !heap->no_reclaim) {