mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Issue #1515 - Add null check to nsCSSFrameConstructor::IsValidSibling
With the changes to layout for WebComponents, it is now apparently possible to pass in null for frame tree items to this function, which would cause a null deref crash if not checked.
This commit is contained in:
parent
ad0f41898a
commit
5fb8c296a0
1 changed files with 5 additions and 0 deletions
|
|
@ -6464,6 +6464,11 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
||||||
nsIContent* aContent,
|
nsIContent* aContent,
|
||||||
StyleDisplay& aDisplay)
|
StyleDisplay& aDisplay)
|
||||||
{
|
{
|
||||||
|
if (!aSibling || !aContent) {
|
||||||
|
// If either of these are null, no sane comparison can be made.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
nsIFrame* parentFrame = aSibling->GetParent();
|
nsIFrame* parentFrame = aSibling->GetParent();
|
||||||
nsIAtom* parentType = parentFrame->GetType();
|
nsIAtom* parentType = parentFrame->GetType();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue