diff options
Diffstat (limited to 'layout/base/nsPresShell.cpp')
-rw-r--r-- | layout/base/nsPresShell.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 466a892dbe..f95b14f242 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2978,7 +2978,7 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, bool aScroll, } // Search for an anchor element with a matching "name" attribute - if (!content && htmlDoc) { + if (!content && htmlDoc && mDocument) { // Find a matching list of named nodes nsCOMPtr<nsIDOMNodeList> list = mDocument->GetElementsByName(aAnchorName); if (list) { |