зеркало из https://github.com/mozilla/gecko-dev.git
Fix for crash when printing emails - Bug #: 48437 - r: xxxxx
This commit is contained in:
Родитель
d12fd633d0
Коммит
2f0f731831
|
@ -61,6 +61,7 @@ nsMsgPrintEngine::nsMsgPrintEngine() :
|
|||
mWindow(nsnull)
|
||||
{
|
||||
mCurrentlyPrintingURI = -1;
|
||||
mContentViewer = nsnull;
|
||||
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
@ -97,7 +98,6 @@ nsMsgPrintEngine::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChan
|
|||
{
|
||||
// Now, fire off the print operation!
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
|
||||
// Tell the user the message is loaded...
|
||||
PRUnichar *msg = GetString(NS_ConvertASCIItoUCS2("MessageLoaded").GetUnicode());
|
||||
|
@ -125,10 +125,10 @@ nsMsgPrintEngine::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChan
|
|||
}
|
||||
}
|
||||
|
||||
mDocShell->GetContentViewer(getter_AddRefs(viewer));
|
||||
if (viewer)
|
||||
mDocShell->GetContentViewer(getter_AddRefs(mContentViewer));
|
||||
if (mContentViewer)
|
||||
{
|
||||
nsCOMPtr<nsIContentViewerFile> viewerFile = do_QueryInterface(viewer);
|
||||
nsCOMPtr<nsIContentViewerFile> viewerFile = do_QueryInterface(mContentViewer);
|
||||
if (viewerFile)
|
||||
{
|
||||
if (mCurrentlyPrintingURI == 0)
|
||||
|
|
|
@ -71,6 +71,7 @@ protected:
|
|||
nsStringArray mURIArray;
|
||||
PRInt32 mCurrentlyPrintingURI;
|
||||
|
||||
nsCOMPtr<nsIContentViewer> mContentViewer;
|
||||
nsCOMPtr<nsIStringBundle> mStringBundle; // String bundles...
|
||||
nsCOMPtr<nsIMsgStatusFeedback> mFeedback; // Tell the user something why don't ya'
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче