diff --git a/src/global.c b/src/global.c index 691f0d4f6..22127faf7 100644 --- a/src/global.c +++ b/src/global.c @@ -64,6 +64,8 @@ git_global_st *git__global_state(void) { void *ptr; + assert(_tls_init); + if ((ptr = TlsGetValue(_tls_index)) != NULL) return ptr; @@ -105,6 +107,8 @@ git_global_st *git__global_state(void) { void *ptr; + assert(_tls_init); + if ((ptr = pthread_getspecific(_tls_key)) != NULL) return ptr;