From 0391ba2c9dd61a2d6ef99fd4297e97bfb325efef Mon Sep 17 00:00:00 2001 From: Anthony Wee Date: Tue, 31 Dec 2019 16:04:45 -0800 Subject: [PATCH] bpo-29778: Fix incorrect NULL check The commit below introduced a NULL check which causes a call to _PyPathConfig_InitDLLPath() to be skipped if _Py_dll_path == NULL. https://github.com/python/cpython/commit/c422167749f92d4170203e996a2c619c818335ea#diff-87aed37b4704d4e1513be6378c9c7fe6R169 --- Python/pathconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/pathconfig.c b/Python/pathconfig.c index 363b7686bc4515a..6abc648769f712a 100644 --- a/Python/pathconfig.c +++ b/Python/pathconfig.c @@ -150,7 +150,7 @@ _PyWideStringList_Join(const PyWideStringList *list, wchar_t sep) static PyStatus _PyPathConfig_InitDLLPath(void) { - if (_Py_dll_path == NULL) { + if (_Py_dll_path != NULL) { /* Already set: nothing to do */ return _PyStatus_OK(); }