mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engine: ++exceptional handling
issue: https://github.com/thorvg/thorvg/pull/2955
This commit is contained in:
parent
4ec7ce65bc
commit
a5dc165fa8
1 changed files with 2 additions and 0 deletions
|
@ -598,6 +598,8 @@ RenderCompositor* SwRenderer::target(const RenderRegion& region, ColorSpace cs)
|
|||
if (x + w > sw) w = (sw - x);
|
||||
if (y + h > sh) h = (sh - y);
|
||||
|
||||
if (w == 0 || h == 0) return nullptr;
|
||||
|
||||
cmp->compositor->recoverSfc = surface;
|
||||
cmp->compositor->recoverCmp = surface->compositor;
|
||||
cmp->compositor->valid = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue