Index: trunk/psLib/src/sys/psThread.c
===================================================================
--- trunk/psLib/src/sys/psThread.c	(revision 28351)
+++ trunk/psLib/src/sys/psThread.c	(revision 28400)
@@ -278,5 +278,6 @@
     for (int i = 0; i < nThreads; i++) {
         psThread *thread = psThreadAlloc(); // Thread for pool
-        pthread_create(&thread->pt, NULL, psThreadLauncher, thread);
+        int success = pthread_create(&thread->pt, NULL, psThreadLauncher, thread);
+        psAssert(!success, "Unable to start thread");
         pool->data[i] = thread;
     }
@@ -365,4 +366,5 @@
 bool psThreadPoolFinalize(void)
 {
+    psThreadLock();
     psFree(pending);
     pending = NULL;
@@ -386,4 +388,6 @@
 #endif
 
+    psThreadUnlock();
+
     return true;
 }
