diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-05 07:40:25 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-05 07:41:07 +0800 |
commit | ce47a81c5796efa1b85d083c841714a0102d3e3d (patch) | |
tree | b50c47cdd1d8ca941367522168032d40f98e7a40 /dom | |
parent | 50124e9ea6c421194b809f0d241a843ad2dcc540 (diff) | |
download | uxp-ce47a81c5796efa1b85d083c841714a0102d3e3d.tar.gz |
Issue #2135 - Follow-up: Fix potential crash if shadow root is null
Diffstat (limited to 'dom')
-rw-r--r-- | dom/base/DocumentOrShadowRoot.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/base/DocumentOrShadowRoot.cpp b/dom/base/DocumentOrShadowRoot.cpp index 876d265cc1..f420ff6a28 100644 --- a/dom/base/DocumentOrShadowRoot.cpp +++ b/dom/base/DocumentOrShadowRoot.cpp @@ -277,7 +277,9 @@ DocumentOrShadowRoot::ElementsFromPointHelper(float aX, float aY, node = node->GetParent(); if (node) { ShadowRoot* shadow = ShadowRoot::FromNode(node); - node = shadow->Host(); + if (shadow) { + node = shadow->Host(); + } } } |