fix segfault on exit if no http section is defined in confguraiton,

the bug has been introduced in r1947
This commit is contained in:
Igor Sysoev
2009-04-15 20:28:36 +00:00
parent ca878c8ccc
commit e4ecddfdb0

View File

@@ -1061,12 +1061,10 @@ ngx_http_perl_exit(ngx_cycle_t *cycle)
pmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_perl_module);
{
dTHXa(pmcf->perl);
PERL_SET_CONTEXT(pmcf->perl);
PERL_SYS_TERM();
if (pmcf) {
dTHXa(pmcf->perl);
PERL_SET_CONTEXT(pmcf->perl);
PERL_SYS_TERM();
}
}