summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2023-04-07 23:22:26 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2023-04-07 23:24:03 +0800
commite35a3f19c72904bd555906202bd0d2c86544dfd5 (patch)
treeb5d36ad55efbfa4a2f602d1a4a58c3cfa82da590 /layout
parentc2b9a9e0057964d9ec96933cc02a11c60b234698 (diff)
downloaduxp-e35a3f19c72904bd555906202bd0d2c86544dfd5.tar.gz
Issue #252 - Follow-up: Include a null check against mDocument
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsPresShell.cpp2
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) {