From 1e55a5d9188b87da8632e217b238838effb1cdeb Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 7 Feb 2018 21:18:43 +0100 Subject: Bug 1261175. --- layout/base/nsDocumentViewer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index a1105ae52..782ac332c 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -544,6 +544,12 @@ nsDocumentViewer::~nsDocumentViewer() mDocument->Destroy(); } + if (mPrintEngine) { + mPrintEngine->Destroy(); + mPrintEngine = nullptr; + } + + MOZ_RELEASE_ASSERT(mDestroyRefCount == 0); NS_ASSERTION(!mPresShell && !mPresContext, "User did not call nsIContentViewer::Destroy"); if (mPresShell || mPresContext) { -- cgit v1.2.3