summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsLayoutUtils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index f0341f9ef..07befdc81 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -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;