diff options
-rw-r--r-- | apps/app_voicemail.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index ba06a87ce..d720fb761 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2599,7 +2599,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ if (txt && EXISTS(dir,msgnum,fn,chan->language)) { fclose(txt); rename(tmptxtfile, txtfile); - } else if (!EXISTS(dir,msgnum,fn,chan->language)) { + } else if (txt && !EXISTS(dir,msgnum,fn,chan->language)) { if (option_debug) ast_log(LOG_DEBUG, "The recorded media file is gone, so we should remove the .txt file too!\n"); fclose(txt); |