mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engien renderer: ++safety
+exceptional handling for the drawing region.
This commit is contained in:
parent
b5e134399d
commit
72ee1c4343
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,8 @@ struct SwTask : Task
|
|||
region.y = bbox.min.y > 0 ? bbox.min.y : 0;
|
||||
region.w = bbox.max.x - region.x;
|
||||
region.h = bbox.max.y - region.y;
|
||||
if (region.w < 0) region.w = 0;
|
||||
if (region.h < 0) region.h = 0;
|
||||
|
||||
return region;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue