From 5daccabeadd21a8d09f4e439e249b035fb3ad033 Mon Sep 17 00:00:00 2001 From: "rhp%netscape.com" Date: Wed, 26 Jan 2000 00:30:57 +0000 Subject: [PATCH] Fix for forwarding naming bug - Bug #: 25027 - r: jefft git-svn-id: svn://10.0.0.236/trunk@58651 18797224-902f-48f8-a5cc-f745e15eee43 --- .../compose/src/nsMsgAttachmentHandler.cpp | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp b/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp index d64f829851c..3ed36a51cb2 100644 --- a/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp +++ b/mozilla/mailnews/compose/src/nsMsgAttachmentHandler.cpp @@ -432,7 +432,7 @@ nsMsgAttachmentHandler::SnarfMsgAttachment(nsMsgCompFields *compFields) mFileSpec = nsMsgCreateTempFileSpec("nsmail.tmp"); mCompFields = compFields; PR_FREEIF(m_real_name); - m_real_name = PL_strdup("forward.eml"); + m_real_name = PL_strdup("ForwardedMessage.eml"); PR_FREEIF(m_type); m_type = PL_strdup("message/rfc822"); PR_FREEIF(m_override_type); @@ -467,12 +467,19 @@ nsMsgAttachmentHandler::SnarfMsgAttachment(nsMsgCompFields *compFields) done: if (NS_FAILED(rv)) { - mOutFile->close(); - delete mOutFile; - mOutFile = nsnull; - mFileSpec->Delete(PR_FALSE); - delete mFileSpec; - mFileSpec = nsnull; + if (mOutFile) + { + mOutFile->close(); + delete mOutFile; + mOutFile = nsnull; + } + + if (mFileSpec) + { + mFileSpec->Delete(PR_FALSE); + delete mFileSpec; + mFileSpec = nsnull; + } } if (messageService) ReleaseMessageServiceFromURI(m_uri, messageService);