diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-18 22:24:29 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-18 22:24:29 +0100 |
commit | 3029dee77bd01e867bc3c7e49bfd14c1484581bb (patch) | |
tree | 0b929b776e8dbe5b3fe4c15b2e556a017131325b /layout/base/nsLayoutUtils.cpp | |
parent | 27f45bc243b45a13c65fb42db0369fd8b8317675 (diff) | |
download | UXP-3029dee77bd01e867bc3c7e49bfd14c1484581bb.tar UXP-3029dee77bd01e867bc3c7e49bfd14c1484581bb.tar.gz UXP-3029dee77bd01e867bc3c7e49bfd14c1484581bb.tar.lz UXP-3029dee77bd01e867bc3c7e49bfd14c1484581bb.tar.xz UXP-3029dee77bd01e867bc3c7e49bfd14c1484581bb.zip |
Add nullcheck for frames in FindNearestCommonAncestorFrame
This resolves #978.
Diffstat (limited to 'layout/base/nsLayoutUtils.cpp')
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 4 |
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; |