diff -u -r1.812 chan_sip.c --- channels/chan_sip.c 23 Aug 2005 01:50:11 -0000 1.812 +++ channels/chan_sip.c 23 Aug 2005 10:21:19 -0000 @@ -1014,6 +1014,11 @@ struct sip_history *hist, *prev; char *c; + if (p == NULL) { + ast_log(LOG_WARNING, "append_history() called with null sip_pvt"); + return 0; + } + if (!recordhistory) return 0; if(!(hist = malloc(sizeof(struct sip_history)))) {