Fix #115648: Crash on startup with an incompatible PYTHONPATH
Regression in [0]. PyPreConfig.use_environment was internalized to 0
but PyConfig.use_environment wasn't.
Thanks to @unwave for finding the root cause.
[0]: cafd6b519c
This commit is contained in:
@@ -385,7 +385,12 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
|
||||
PyStatus status;
|
||||
bool has_python_executable = false;
|
||||
|
||||
PyConfig_InitPythonConfig(&config);
|
||||
if (py_use_system_env) {
|
||||
PyConfig_InitPythonConfig(&config);
|
||||
}
|
||||
else {
|
||||
PyConfig_InitIsolatedConfig(&config);
|
||||
}
|
||||
|
||||
/* Suppress error messages when calculating the module search path.
|
||||
* While harmless, it's noisy. */
|
||||
|
||||
Reference in New Issue
Block a user