--- asterisk-1.0.3-dist/rtp.c 2004-11-25 19:16:16.000000000 +0100 +++ asterisk-1.0.3/rtp.c 2005-01-06 00:18:43.000000000 +0100 @@ -408,7 +408,13 @@ struct rtpPayloadType rtpPT; len = sizeof(sin); - + + if(!rtp) { + /* We're fscked!! FIXME - this can occur from chan_mgcp! */ + ast_log(LOG_WARNING, "RTP nullpointer fubar - returning null frame, hope thats OK...\n"); + return &null_frame; + } + /* Cache where the header will go */ res = recvfrom(rtp->s, rtp->rawdata + AST_FRIENDLY_OFFSET, sizeof(rtp->rawdata) - AST_FRIENDLY_OFFSET, 0, (struct sockaddr *)&sin, &len); ~