summaryrefslogtreecommitdiff
path: root/layout/style/Loader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style/Loader.cpp')
-rw-r--r--layout/style/Loader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
index 1be703c027..ce9a601a90 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -2083,7 +2083,7 @@ Loader::LoadStyleLink(nsIContent* aElement,
PrepareSheet(sheet, aTitle, aMedia, nullptr, nullptr, *aIsAlternate, *aIsExplicitlyEnabled);
- if (aElement->HasFlag(NODE_IS_IN_SHADOW_TREE)) {
+ if (aElement && aElement->HasFlag(NODE_IS_IN_SHADOW_TREE)) {
aElement->GetContainingShadow()->InsertSheet(sheet, aElement);
} else {
rv = InsertSheetInDoc(sheet, aElement, mDocument);