mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1179049. Properly null check for draw target in box shadow code. r=mstange
This commit is contained in:
parent
423571717d
commit
2ad9b546ea
@ -434,6 +434,11 @@ CreateBoxShadow(DrawTarget& aDT, SourceSurface* aBlurMask, const gfxRGBA& aShado
|
||||
gfxPlatform* platform = gfxPlatform::GetPlatform();
|
||||
RefPtr<DrawTarget> boxShadowDT =
|
||||
platform->CreateOffscreenContentDrawTarget(blurredSize, SurfaceFormat::B8G8R8A8);
|
||||
|
||||
if (!boxShadowDT) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(boxShadowDT->GetType() == aDT.GetType());
|
||||
|
||||
ColorPattern shadowColor(ToDeviceColor(aShadowColor));
|
||||
@ -475,6 +480,10 @@ GetBlur(DrawTarget& aDT,
|
||||
}
|
||||
|
||||
RefPtr<SourceSurface> boxShadow = CreateBoxShadow(aDT, blurMask, aShadowColor);
|
||||
if (!boxShadow) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CacheBlur(aDT, minSize, aBlurRadius, aCornerRadii, aShadowColor, aExtendDestBy, boxShadow);
|
||||
return boxShadow;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user