Bug 1244076 - Fix a crash in nsDocShell::IssueWarning by null-checking mContentViewer; r=bzbarsky
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user