Bug 1275194: Null check mPrt in nsPrintEngine::FirePrintingErrorEvent before notifying listeners. r=jimm
authorBob Owen <bobowencode@gmail.com>
Tue, 24 May 2016 08:18:54 +0100
changeset 337990 388863b89c72f99246748a5ee96131cd8d69b420
parent 337989 08111f812323056882d6d2eec909c379109cc863
child 337991 ddaa43e26575a1c5c0248d4826c9e30e65162ef1
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1275194
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275194: Null check mPrt in nsPrintEngine::FirePrintingErrorEvent before notifying listeners. r=jimm MozReview-Commit-ID: CSukeDyGAvD
layout/printing/nsPrintEngine.cpp
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -1554,17 +1554,19 @@ nsPrintEngine::FirePrintingErrorEvent(ns
   event->SetTrusted(true);
 
   RefPtr<AsyncEventDispatcher> asyncDispatcher =
     new AsyncEventDispatcher(doc, event);
   asyncDispatcher->mOnlyChromeDispatch = true;
   asyncDispatcher->RunDOMEventWhenSafe();
 
   // Inform any progress listeners of the Error.
-  mPrt->DoOnStatusChange(aPrintError);
+  if (mPrt) {
+    mPrt->DoOnStatusChange(aPrintError);
+  }
 }
 
 //-----------------------------------------------------------------
 //-- Section: Reflow Methods
 //-----------------------------------------------------------------
 
 nsresult
 nsPrintEngine::ReconstructAndReflow(bool doSetPixelScale)