diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 7286a7bd60..92fc41d8b7 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1756,7 +1756,7 @@ static int messagecount(const char *context, const char *mailbox, const char *fo } if (!vms_p) { - create_vm_state_from_user(vmu); + vms_p = create_vm_state_from_user(vmu); } ret = init_mailstream(vms_p, fold); if (!vms_p->mailstream) {