Merged revisions 48101 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 29 Nov 2006 04:28:21 +0000 (04:28 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 29 Nov 2006 04:28:21 +0000 (04:28 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48101 | file | 2006-11-28 23:26:53 -0500 (Tue, 28 Nov 2006) | 2 lines

Don't crash if the mailstream was not created.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48102 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 57eed5f..8e27d90 100644 (file)
@@ -4673,7 +4673,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;
        }