Bug 1966676 - Check for pattern surface before accessing offset. r=aosmond, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D258034
This commit is contained in:
committed by
rvandermeulen@mozilla.com
parent
e777d12072
commit
09c5fac79d
@@ -589,7 +589,9 @@ static void SetPaintPattern(SkPaint& aPaint, const Pattern& aPattern,
|
||||
case PatternType::SURFACE: {
|
||||
const SurfacePattern& pat = static_cast<const SurfacePattern&>(aPattern);
|
||||
Matrix offsetMatrix = pat.mMatrix;
|
||||
if (pat.mSurface) {
|
||||
offsetMatrix.PreTranslate(pat.mSurface->GetRect().TopLeft());
|
||||
}
|
||||
sk_sp<SkImage> image =
|
||||
GetSkImageForSurface(pat.mSurface, &aLock, aBounds, &offsetMatrix);
|
||||
if (!image) {
|
||||
|
||||
Reference in New Issue
Block a user