tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e8164014e07cf35ba0766973fc335a9c3928daba
parent dcd39b58cd96d17bae87bc78d639277315baf982
Author: Christian Holler (:decoder) <choller@mozilla.com>
Date:   Tue, 30 Sep 2025 20:28:11 +0000

Bug 1991715 - Add missing null check in DrawTargetSkia::MaskSurface. r=lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D266862

Diffstat:
Mgfx/2d/DrawTargetSkia.cpp | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp @@ -1482,6 +1482,11 @@ void DrawTargetSkia::MaskSurface(const Pattern& aSource, SourceSurface* aMask, Point aOffset, const DrawOptions& aOptions) { Maybe<MutexAutoLock> lock; sk_sp<SkImage> maskImage = GetSkImageForSurface(aMask, &lock); + if (!maskImage) { + gfxDebug() << "Failed get Skia mask image for MaskSurface"; + return; + } + SkMatrix maskOffset = SkMatrix::Translate( PointToSkPoint(aOffset + Point(aMask->GetRect().TopLeft()))); sk_sp<SkShader> maskShader = maskImage->makeShader(