summaryrefslogtreecommitdiffstats
path: root/Modules/getpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r--Modules/getpath.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c
index b98c520..be164df 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -699,13 +699,11 @@ calculate_path(void)
*/
bufsz = 0;
- if (_rtpypath) {
+ if (_rtpypath && _rtpypath[0] != '\0') {
size_t rtpypath_len;
rtpypath = _Py_char2wchar(_rtpypath, &rtpypath_len);
if (rtpypath != NULL)
bufsz += rtpypath_len + 1;
- else
- _rtpypath = NULL;
}
defpath = _pythonpath;