threads: Assert that the global state is initialized

This commit is contained in:
Vicent Marti 2012-10-01 17:59:04 +02:00
parent 9063be1f45
commit 93b5fabcc0

View File

@ -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;