diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 5b6d5e4dccec..730fce41ba2c 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -5331,7 +5331,7 @@ nsIFrame* ScrollFrameHelper::GetFrameForDir() const { Element* root = document->GetRootElement(); // But for HTML and XHTML we want the body element. - if (document && document->IsHTMLOrXHTML()) { + if (document->IsHTMLOrXHTML()) { Element* bodyElement = document->GetBodyElement(); if (bodyElement) { root = bodyElement; // we can trust the document to hold on to it