Bug 1245246: Add null check for mDocViewerPrint in nsPrintEngine::FirePrintingErrorEvent. r=roc

This commit is contained in:
Bob Owen 2016-02-04 08:03:52 +00:00
parent 6f377eae5e
commit fdbee7016b

View File

@ -1522,6 +1522,10 @@ void
nsPrintEngine::FirePrintingErrorEvent(nsresult aPrintError)
{
nsCOMPtr<nsIContentViewer> cv = do_QueryInterface(mDocViewerPrint);
if (NS_WARN_IF(!cv)) {
return;
}
nsCOMPtr<nsIDocument> doc = cv->GetDocument();
RefPtr<CustomEvent> event =
NS_NewDOMCustomEvent(doc, nullptr, nullptr);