summaryrefslogtreecommitdiffstats
path: root/layout/svg
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-12 20:20:02 +0200
committerMoonchild <moonchild@palemoon.org>2020-09-12 20:20:02 +0200
commit9eb8b61b8c30255bd3be8c67031e5f14bc1ab8a5 (patch)
tree1252061e34708b421aee47560b405ac4f88c3a24 /layout/svg
parentc779684b3b0ce46aa45ba0c9989f3fc86801cea5 (diff)
downloadUXP-9eb8b61b8c30255bd3be8c67031e5f14bc1ab8a5.tar
UXP-9eb8b61b8c30255bd3be8c67031e5f14bc1ab8a5.tar.gz
UXP-9eb8b61b8c30255bd3be8c67031e5f14bc1ab8a5.tar.lz
UXP-9eb8b61b8c30255bd3be8c67031e5f14bc1ab8a5.tar.xz
UXP-9eb8b61b8c30255bd3be8c67031e5f14bc1ab8a5.zip
Issue #1650 - Add null check.
There are situations where nsCSSClipPathinstance->CreateClipPath(dt) returns null. We need to check for this before trying to use its functions. If there is no clip path, then always return "no hit".
Diffstat (limited to 'layout/svg')
-rw-r--r--layout/svg/nsCSSClipPathInstance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layout/svg/nsCSSClipPathInstance.cpp b/layout/svg/nsCSSClipPathInstance.cpp
index 01f7de248..e923eaa0e 100644
--- a/layout/svg/nsCSSClipPathInstance.cpp
+++ b/layout/svg/nsCSSClipPathInstance.cpp
@@ -59,7 +59,7 @@ nsCSSClipPathInstance::HitTestBasicShapeClip(nsIFrame* aFrame,
RefPtr<Path> path = instance.CreateClipPath(drawTarget);
float pixelRatio = float(nsPresContext::AppUnitsPerCSSPixel()) /
aFrame->PresContext()->AppUnitsPerDevPixel();
- return path->ContainsPoint(ToPoint(aPoint) * pixelRatio, Matrix());
+ return path ? path->ContainsPoint(ToPoint(aPoint) * pixelRatio, Matrix()) : false;
}
already_AddRefed<Path>