Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 67161) +++ apps/app_voicemail.c (working copy) @@ -4823,7 +4823,7 @@ ast_unlock_path(vms->curdir); #else for (x=0;x < vmu->maxmsg;x++) { - if (vms->deleted[x]) { + if (vms->deleted && vms->deleted[x]) { if(option_debug > 2) ast_log(LOG_DEBUG,"IMAP delete of %d\n",x); IMAP_DELETE(vms->curdir, x, vms->fn, vms);