From a342ef711c886f6da98b51a900ce7f3cdd58c2bf Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Sun, 2 Mar 2014 05:14:27 -0600 Subject: [PATCH] Bug 978001. Null check presshell in nsViewManager::ProcessPendingUpdatesForView. r=mats --- view/src/nsViewManager.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index f9a67ba3c0e8..0e4b719ba486 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -411,22 +411,24 @@ void nsViewManager::ProcessPendingUpdatesForView(nsView* aView, } NS_ASSERTION(aView->HasWidget(), "FlushDelayedResize removed our widget!"); + if (presShell) { #ifdef MOZ_DUMP_PAINTING - if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { - printf_stderr("---- PAINT START ----PresShell(%p), nsView(%p), nsIWidget(%p)\n", presShell, aView, widget); - } + if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { + printf_stderr("---- PAINT START ----PresShell(%p), nsView(%p), nsIWidget(%p)\n", presShell, aView, widget); + } #endif - nsAutoScriptBlocker scriptBlocker; - SetPainting(true); - presShell->Paint(aView, nsRegion(), nsIPresShell::PAINT_LAYERS); + nsAutoScriptBlocker scriptBlocker; + SetPainting(true); + presShell->Paint(aView, nsRegion(), nsIPresShell::PAINT_LAYERS); #ifdef MOZ_DUMP_PAINTING - if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { - printf_stderr("---- PAINT END ----\n"); - } + if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) { + printf_stderr("---- PAINT END ----\n"); + } #endif - aView->SetForcedRepaint(false); - SetPainting(false); + aView->SetForcedRepaint(false); + SetPainting(false); + } viewManager->FlushDirtyRegionToWidget(aView); } else { viewManager->FlushDirtyRegionToWidget(aView);