]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't crash if the mailstream was not created.
authorJoshua Colp <jcolp@digium.com>
Wed, 29 Nov 2006 04:26:53 +0000 (04:26 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 29 Nov 2006 04:26:53 +0000 (04:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48101 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index f4979ee31a79e6b10b9772380f51c28af3fec890..fa49a3ba37c1a7ebb24470d850bc5b41bcd4a8e2 100644 (file)
@@ -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;
        }