Add nullcheck for frames in FindNearestCommonAncestorFrame

This resolves #978.
This commit is contained in:
wolfbeast 2019-02-18 22:24:29 +01:00 committed by Roy Tam
commit 21daa1d5cb

View file

@ -2681,6 +2681,10 @@ nsLayoutUtils::GetTransformToAncestorScaleExcludingAnimated(nsIFrame* aFrame)
nsIFrame*
nsLayoutUtils::FindNearestCommonAncestorFrame(nsIFrame* aFrame1, nsIFrame* aFrame2)
{
if (!aFrame1 || !aFrame2) {
return nullptr;
}
AutoTArray<nsIFrame*,100> ancestors1;
AutoTArray<nsIFrame*,100> ancestors2;
nsIFrame* commonAncestor = nullptr;