mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1274079, ensure that after dispatching beforeprint, we have still valid ContentViewer to print, r=bz
--HG-- extra : rebase_source : c07cf7794d48d4f9b52b2646c18099a33bbea788
This commit is contained in:
parent
86f360cd93
commit
c8587c2d07
@ -3728,6 +3728,9 @@ nsDocumentViewer::PrintPreview(nsIPrintSettings* aPrintSettings,
|
||||
nsAutoPtr<nsPrintEventDispatcher> beforeAndAfterPrint(
|
||||
new nsPrintEventDispatcher(doc));
|
||||
NS_ENSURE_STATE(!GetIsPrinting());
|
||||
// beforeprint event may have caused ContentViewer to be shutdown.
|
||||
NS_ENSURE_STATE(mContainer);
|
||||
NS_ENSURE_STATE(mDeviceContext);
|
||||
if (!mPrintEngine) {
|
||||
mPrintEngine = new nsPrintEngine();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user