mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
b=482439 don't risk dereferencing a possibly-null pointer in nsDocument::ElementFromPointHelper r=smaug
This commit is contained in:
parent
2e14d4895d
commit
c3f0eac9a5
@ -2672,8 +2672,8 @@ nsDocument::ElementFromPointHelper(PRInt32 aX, PRInt32 aY,
|
||||
// or a node that isn't an element (such as a text frame node),
|
||||
// replace it with the first non-anonymous parent node of type element.
|
||||
while (ptContent &&
|
||||
!ptContent->IsNodeOfType(nsINode::eELEMENT) ||
|
||||
ptContent->IsInAnonymousSubtree()) {
|
||||
(!ptContent->IsNodeOfType(nsINode::eELEMENT) ||
|
||||
ptContent->IsInAnonymousSubtree())) {
|
||||
// XXXldb: Faster to jump to GetBindingParent if non-null?
|
||||
ptContent = ptContent->GetParent();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user