mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +09:00
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".
This commit is contained in:
parent
f7b02cecab
commit
dc12585a82
1 changed files with 1 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue