From: havoc Date: Sun, 23 Oct 2011 22:52:27 +0000 (+0000) Subject: move the mutex creation to after the memory pool is created X-Git-Tag: xonotic-v0.6.0~163^2~90 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b498a30128ee361b690bad251eee65c911ac35d4;p=xonotic%2Fdarkplaces.git move the mutex creation to after the memory pool is created git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11467 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/zone.c b/zone.c index 87e71212..02920535 100644 --- a/zone.c +++ b/zone.c @@ -874,13 +874,13 @@ void Memory_Init (void) u.s = 0x100; mem_bigendian = u.b[0] != 0; - if (Thread_HasThreads()) - mem_mutex = Thread_CreateMutex(); - sentinel_seed = rand(); poolchain = NULL; tempmempool = Mem_AllocPool("Temporary Memory", POOLFLAG_TEMP, NULL); zonemempool = Mem_AllocPool("Zone", 0, NULL); + + if (Thread_HasThreads()) + mem_mutex = Thread_CreateMutex(); } void Memory_Shutdown (void)