diff --git a/src/sdl/i_threads.c b/src/sdl/i_threads.c index 078f4e0f..b9927bab 100644 --- a/src/sdl/i_threads.c +++ b/src/sdl/i_threads.c @@ -284,6 +284,9 @@ I_lock_mutex ( ){ SDL_mutex * mutex; + if (! i_threads_running.value) + return; + mutex = Identity( &i_mutex_pool, i_mutex_pool_mutex, @@ -299,6 +302,9 @@ void I_unlock_mutex ( I_mutex id ){ + if (! i_threads_running.value) + return; + if (SDL_UnlockMutex(id) == -1) abort(); } @@ -310,6 +316,9 @@ I_hold_cond ( ){ SDL_cond * cond; + if (! i_threads_running.value) + return; + cond = Identity( &i_cond_pool, i_cond_pool_mutex, @@ -327,6 +336,9 @@ I_wake_one_cond ( ){ SDL_cond * cond; + if (! i_threads_running.value) + return; + cond = Identity( &i_cond_pool, i_cond_pool_mutex, @@ -344,6 +356,9 @@ I_wake_all_cond ( ){ SDL_cond * cond; + if (! i_threads_running.value) + return; + cond = Identity( &i_cond_pool, i_cond_pool_mutex,