diff --git a/view/nsView.cpp b/view/nsView.cpp index 2dd2449bf68..5d7979e2cc7 100644 --- a/view/nsView.cpp +++ b/view/nsView.cpp @@ -1087,7 +1087,9 @@ nsView::DidCompositeWindow(const TimeStamp& aCompositeStart, nsAutoScriptBlocker scriptBlocker; nsPresContext* context = presShell->GetPresContext(); - context->GetDisplayRootPresContext()->GetRootPresContext()->NotifyDidPaintForSubtree(nsIPresShell::PAINT_COMPOSITE); + nsRootPresContext* rootContext = context->GetDisplayRootPresContext(); + MOZ_ASSERT(rootContext, "rootContext must be valid."); + rootContext->GetRootPresContext()->NotifyDidPaintForSubtree(nsIPresShell::PAINT_COMPOSITE); // If the two timestamps are identical, this was likely a fake composite // event which wouldn't be terribly useful to display.