Extra NULL check in iter2(). Fix #430

This commit is contained in:
Sergey Lyubka 2014-11-07 10:05:42 +00:00
parent 632b3a38a9
commit 9981b99ac8

View File

@ -5209,7 +5209,7 @@ static void iter2(struct ns_connection *nc, int ev, void *param) {
(void) ev;
//DBG(("%p [%s]", conn, msg));
if (sscanf(msg, "%p %n", &func, &n) && func != NULL) {
if (sscanf(msg, "%p %n", &func, &n) && func != NULL && conn != NULL) {
conn->mg_conn.callback_param = (void *) (msg + n);
func(&conn->mg_conn, MG_POLL);
}