diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-18 22:24:29 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-23 02:05:06 +0100 |
commit | 181cb5210e6555102f5215316ea7a9b1771b0717 (patch) | |
tree | e8404e4e916ba70cd935aa3ab80d2c7ebf1d3116 | |
parent | aabb3573ead213b82eac48634a9ede05f45bc963 (diff) | |
download | UXP-181cb5210e6555102f5215316ea7a9b1771b0717.tar UXP-181cb5210e6555102f5215316ea7a9b1771b0717.tar.gz UXP-181cb5210e6555102f5215316ea7a9b1771b0717.tar.lz UXP-181cb5210e6555102f5215316ea7a9b1771b0717.tar.xz UXP-181cb5210e6555102f5215316ea7a9b1771b0717.zip |
Add nullcheck for frames in FindNearestCommonAncestorFrame
This resolves #978.
-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; |