mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engine: adding a check before stroke fill dereference
The crash was observed for empty shapes.
This commit is contained in:
parent
6276e209a7
commit
a13561e9c5
1 changed files with 1 additions and 1 deletions
|
@ -1033,7 +1033,7 @@ bool rasterStroke(SwSurface* surface, SwShape* shape, uint8_t r, uint8_t g, uint
|
||||||
|
|
||||||
bool rasterGradientStroke(SwSurface* surface, SwShape* shape, unsigned id)
|
bool rasterGradientStroke(SwSurface* surface, SwShape* shape, unsigned id)
|
||||||
{
|
{
|
||||||
if (!shape->stroke->fill || !shape->strokeRle) return false;
|
if (!shape->stroke || !shape->stroke->fill || !shape->strokeRle) return false;
|
||||||
|
|
||||||
if (id == FILL_ID_LINEAR) {
|
if (id == FILL_ID_LINEAR) {
|
||||||
if (shape->stroke->fill->translucent) return _rasterTranslucentLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill);
|
if (shape->stroke->fill->translucent) return _rasterTranslucentLinearGradientRle(surface, shape->strokeRle, shape->stroke->fill);
|
||||||
|
|
Loading…
Add table
Reference in a new issue