summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-02-18 22:24:29 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-02-18 22:24:29 +0100
commit3029dee77bd01e867bc3c7e49bfd14c1484581bb (patch)
tree0b929b776e8dbe5b3fe4c15b2e556a017131325b /layout
parent27f45bc243b45a13c65fb42db0369fd8b8317675 (diff)
downloaduxp-3029dee77bd01e867bc3c7e49bfd14c1484581bb.tar.gz
Add nullcheck for frames in FindNearestCommonAncestorFrame
This resolves #978.
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 f0341f9eff..07befdc812 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;