Fix deletion of uninitialized POSIX TLS key

Zero (the initial value of context) is a valid TLS key, so doing this
can delete someone else's key.

Fixes #627.
This commit is contained in:
Roman Donchenko
2015-10-28 15:22:33 +03:00
committed by Camilla Berglund
parent 43f4afef78
commit cdf08c1ff3
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -37,6 +37,7 @@
//
typedef struct _GLFWtlsPOSIX
{
GLFWbool allocated;
pthread_key_t context;
} _GLFWtlsPOSIX;