]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a possible pthread crash
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 May 2013 09:50:57 +0000 (09:50 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 May 2013 09:50:57 +0000 (09:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11947 d7cf8633-e32d-0410-b094-e92efae38249

thread_pthread.c

index e86b2c3828fde8c2a5f387290ed38d9e11ca270c..ec1f91776f122339271eb2d34e5b1c6ffcad3474 100644 (file)
@@ -31,6 +31,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
        Sys_PrintfToTerminal("%p mutex create %s:%i\n" , mutexp, filename, fileline);
 #endif
 #ifdef THREADRECURSIVE
+       pthread_mutexattr_init(&attr);
        pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
        pthread_mutex_init(mutexp, &attr);
 #else