aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 72d8e91f8..3278ec790 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4807,7 +4807,7 @@ static int copy_message(struct ast_channel *chan, struct ast_vm_user *vmu, int i
static int messagecount(const char *context, const char *mailbox, const char *folder)
{
- return __has_voicemail(context, mailbox, folder, 0) + (strcmp(folder, "INBOX") ? 0 : __has_voicemail(context, mailbox, "Urgent", 0));
+ return __has_voicemail(context, mailbox, folder, 0) + (folder && strcmp(folder, "INBOX") ? 0 : __has_voicemail(context, mailbox, "Urgent", 0));
}
static int __has_voicemail(const char *context, const char *mailbox, const char *folder, int shortcircuit)