Skip to content

Commit 7e6c550

Browse files
committed
more assertions
1 parent 8e4230a commit 7e6c550

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ void _mi_theap_cached_set(mi_theap_t* theap) {
946946
void _mi_theap_default_set(mi_theap_t* theap) {
947947
mi_theap_t* const theap_old = _mi_theap_default();
948948
mi_assert_internal(theap != NULL);
949+
mi_assert_internal(theap->tld != NULL);
949950
mi_assert_internal(theap->tld->thread_id==0 || theap->tld->thread_id==_mi_thread_id());
950951
mi_tls_slots_init();
951952
#if MI_TLS_MODEL_THREAD_LOCAL

src/theap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ void _mi_theap_init(mi_theap_t* theap, mi_heap_t* heap, mi_tld_t* tld)
175175
{
176176
mi_assert_internal(theap!=NULL);
177177
mi_assert_internal(heap!=NULL);
178+
mi_assert_internal(tld!=NULL);
178179
mi_memid_t memid = theap->memid;
179180
_mi_memcpy_aligned(theap, &_mi_theap_empty, sizeof(mi_theap_t));
180181
theap->memid = memid;

0 commit comments

Comments
 (0)