mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 20:33:41 +00:00
threads: Assert that the global state is initialized
This commit is contained in:
parent
9063be1f45
commit
93b5fabcc0
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user