mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #2135 - Follow-up: Check for aElement not being null
This was introduced to Make <link rel="stylesheet"> work in shadow trees. eElement can, however, be `null` here and if so, it would crash.
This commit is contained in:
parent
1f0df8f421
commit
2249fbdf49
1 changed files with 1 additions and 1 deletions
|
|
@ -2118,7 +2118,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue