mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 14:54:25 +00: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:
@@ -6464,6 +6464,11 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
||||
nsIContent* aContent,
|
||||
StyleDisplay& aDisplay)
|
||||
{
|
||||
if (!aSibling || !aContent) {
|
||||
// If either of these are null, no sane comparison can be made.
|
||||
return false;
|
||||
}
|
||||
|
||||
nsIFrame* parentFrame = aSibling->GetParent();
|
||||
nsIAtom* parentType = parentFrame->GetType();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user