mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-10 14:31:07 +02:00
fixed crash if missing rtmp{} block in config; thanks to @Freexer
This commit is contained in:
parent
6d5986aa59
commit
8104bff06f
|
@ -306,8 +306,8 @@ ngx_rtmp_exec_init_process(ngx_cycle_t *cycle)
|
|||
ngx_rtmp_exec_t *e;
|
||||
ngx_uint_t n;
|
||||
|
||||
if (cmcf->servers.nelts == 0) {
|
||||
return NGX_ERROR;
|
||||
if (cmcf == NULL || cmcf->servers.nelts == 0) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
/* execs are always started by the first worker */
|
||||
|
|
|
@ -1561,7 +1561,7 @@ ngx_rtmp_relay_init_process(ngx_cycle_t *cycle)
|
|||
ngx_rtmp_listen_t *lst;
|
||||
ngx_event_t **pevent, *event;
|
||||
|
||||
if (cmcf->listen.nelts == 0) {
|
||||
if (cmcf == NULL || cmcf->listen.nelts == 0) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue