]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Correct a condition from the prior patch that could happen in rare circumstances...
authorBJ Weschke <bweschke@btwtech.com>
Mon, 1 May 2006 19:34:29 +0000 (19:34 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Mon, 1 May 2006 19:34:29 +0000 (19:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23988 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index ba06a87cef6a54ee4f950ae1b91d24f596157724..d720fb761b1f9c34bdf107be5517d7c63bd99166 100644 (file)
@@ -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);