Bug 1244076 - Fix a crash in nsDocShell::IssueWarning by null-checking mContentViewer; r=bzbarsky

This commit is contained in:
Ehsan Akhgari
2016-02-02 10:24:32 -05:00
parent f2d0660f17
commit c1da891a28

View File

@@ -14313,9 +14313,11 @@ nsDocShell::InFrameSwap()
NS_IMETHODIMP
nsDocShell::IssueWarning(uint32_t aWarning, bool aAsError)
{
nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument();
if (doc) {
doc->WarnOnceAbout(nsIDocument::DeprecatedOperations(aWarning), aAsError);
if (mContentViewer) {
nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument();
if (doc) {
doc->WarnOnceAbout(nsIDocument::DeprecatedOperations(aWarning), aAsError);
}
}
return NS_OK;
}