From a19f744c117f6a6af1ce92345da04288f8df4a47 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 5 Jan 2013 10:24:53 +1100 Subject: [PATCH] Bug 826195 - Tweak nsPrintObject sanity assertions. r=dholbert --- layout/printing/nsPrintData.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/printing/nsPrintData.cpp b/layout/printing/nsPrintData.cpp index c4c97f927ef..9319ac643fd 100644 --- a/layout/printing/nsPrintData.cpp +++ b/layout/printing/nsPrintData.cpp @@ -104,12 +104,12 @@ AssertPresShellsAndContextsSane(nsPrintObject* aPO, if (!aPO->mPresShell && aPO->mPresContext) { ASSERT_AND_NOTE("print object has pres context but no pres shell"); } - if (aPO->mPresContext && aPO->mPresContext->GetPresShell() != aPO->mPresShell) { + if (aPO->mPresContext && + aPO->mPresShell && + aPO->mPresContext->GetPresShell() && + aPO->mPresContext->GetPresShell() != aPO->mPresShell) { ASSERT_AND_NOTE("print object has mismatching pres shell and pres context"); } - if (aPO->mPresContext && !aPO->mPresContext->GetPresShell()) { - ASSERT_AND_NOTE("mPresShell->GetPresShell() is null"); - } for (uint32_t i = 0; i < aPO->mKids.Length(); i++) { AssertPresShellsAndContextsSane(aPO->mKids[i], aPresShells, aPresContexts);