From: Jeff Peeler Date: Thu, 15 Jul 2010 13:48:58 +0000 (+0000) Subject: In a perfect world, the frame source would never be NULL. In the meantime, don't... X-Git-Tag: 1.4.35-rc1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fbc48765986af83cc79c40e6a9a93a14db4d031;p=thirdparty%2Fasterisk.git In a perfect world, the frame source would never be NULL. In the meantime, don't crash when it is. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@276652 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/channel.c b/main/channel.c index a745aa6cd7..af501c146d 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3044,7 +3044,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr) res = 0; /* XXX explain, why 0 ? */ goto done; } - if (chan->generatordata && strcasecmp(fr->src, "ast_prod")) { + if (chan->generatordata && (!fr->src || strcasecmp(fr->src, "ast_prod"))) { if (ast_test_flag(chan, AST_FLAG_WRITE_INT)) { ast_deactivate_generator(chan); } else {