summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-12 20:20:02 +0200
committerMoonchild <moonchild@palemoon.org>2020-09-21 10:59:24 +0000
commit7564818c79cf67d0dcf866579d5b74647b96dae6 (patch)
tree98ac6d656d5647acf3ec382727cd0db8a5819775 /layout
parent10866dd35c4265049efff86b8cab89239804903c (diff)
downloadUXP-7564818c79cf67d0dcf866579d5b74647b96dae6.tar
UXP-7564818c79cf67d0dcf866579d5b74647b96dae6.tar.gz
UXP-7564818c79cf67d0dcf866579d5b74647b96dae6.tar.lz
UXP-7564818c79cf67d0dcf866579d5b74647b96dae6.tar.xz
UXP-7564818c79cf67d0dcf866579d5b74647b96dae6.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')
-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>