From 8f648495ecee701a34b74c7f6f7dcf8912eeb5ef Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Fri, 30 Mar 2012 20:54:46 +0400 Subject: [PATCH] fixed crash --- ngx_rtmp_netcall_module.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ngx_rtmp_netcall_module.c b/ngx_rtmp_netcall_module.c index 9612766..74b415e 100644 --- a/ngx_rtmp_netcall_module.c +++ b/ngx_rtmp_netcall_module.c @@ -123,8 +123,10 @@ ngx_rtmp_netcall_disconnect(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_netcall_module); - while (ctx->cs) { - ngx_rtmp_netcall_close(ctx->cs->pc->connection); + if (ctx) { + while (ctx->cs) { + ngx_rtmp_netcall_close(ctx->cs->pc->connection); + } } return NGX_OK;