diff options
Diffstat (limited to 'Python/thread.c')
-rw-r--r-- | Python/thread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/thread.c b/Python/thread.c index bc501822..3a2c7af 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -267,6 +267,8 @@ find_key(int key, void *value) struct key *p; long id = PyThread_get_thread_ident(); + if (!keymutex) + return NULL; PyThread_acquire_lock(keymutex, 1); for (p = keyhead; p != NULL; p = p->next) { if (p->id == id && p->key == key) |