sw_engine: ++exceptional handling

issue: https://github.com/thorvg/thorvg/pull/2955
This commit is contained in:
Hermet Park 2024-11-18 12:38:51 +09:00
parent 98fbc90f9b
commit fcf080cc4e

View file

@ -603,6 +603,8 @@ RenderCompositor* SwRenderer::target(const RenderRegion& region, ColorSpace cs)
if (x + w > sw) w = (sw - x); if (x + w > sw) w = (sw - x);
if (y + h > sh) h = (sh - y); if (y + h > sh) h = (sh - y);
if (w == 0 || h == 0) return nullptr;
cmp->compositor->recoverSfc = surface; cmp->compositor->recoverSfc = surface;
cmp->compositor->recoverCmp = surface->compositor; cmp->compositor->recoverCmp = surface->compositor;
cmp->compositor->valid = false; cmp->compositor->valid = false;