From: Joshua Colp Date: Wed, 29 Nov 2006 04:26:53 +0000 (+0000) Subject: Don't crash if the mailstream was not created. X-Git-Tag: 1.4.0-beta4~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53b04eea95a23fe30d1af407ce1e73f816fff5b1;p=thirdparty%2Fasterisk.git Don't crash if the mailstream was not created. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48101 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index f4979ee31a..fa49a3ba37 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4648,7 +4648,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box) if(option_debug > 2) ast_log(LOG_DEBUG,"Before init_mailstream, user is %s\n",vmu->imapuser); ret = init_mailstream(vms, box); - if (ret != 0) { + if (ret != 0 || !vms->mailstream) { ast_log (LOG_ERROR,"Could not initialize mailstream\n"); return -1; }