mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Bug 880: Prevent SIGSEGV in init_python when -no-home is used.
Before this patch, init_python would crash trying to set up the PYTHONPATH environment variable. Now it omits the home directory from the variable in that case. [ Related to commit 78bd416dc096c56d8f14a1e49c7bf688edfe3872 in ELinks 0.12.GIT but quite different internally. --KON ]
This commit is contained in:
parent
ce2137c035
commit
defc67d020
@ -39,8 +39,12 @@ cleanup_python(struct module *module)
|
||||
void
|
||||
init_python(struct module *module)
|
||||
{
|
||||
unsigned char *python_path = straconcat(elinks_home, ":", CONFDIR, NULL);
|
||||
unsigned char *python_path;
|
||||
|
||||
if (elinks_home)
|
||||
python_path = straconcat(elinks_home, ":", CONFDIR, NULL);
|
||||
else
|
||||
python_path = stracpy(CONFDIR);
|
||||
if (!python_path) return;
|
||||
env_set("PYTHONPATH", python_path, -1);
|
||||
mem_free(python_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user