mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engine: fix a composition crash issue.
Added an exceptional handling for out of buffer boundary.
This commit is contained in:
parent
69ff5a484b
commit
c0362cb69c
1 changed files with 3 additions and 0 deletions
|
@ -375,6 +375,9 @@ bool SwRenderer::beginComposite(Compositor* cmp, CompositeMethod method, uint32_
|
||||||
|
|
||||||
Compositor* SwRenderer::target(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
|
Compositor* SwRenderer::target(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
|
||||||
{
|
{
|
||||||
|
//Out of boundary
|
||||||
|
if (x > surface->w || y > surface->h) return nullptr;
|
||||||
|
|
||||||
SwSurface* cmp = nullptr;
|
SwSurface* cmp = nullptr;
|
||||||
|
|
||||||
//Use cached data
|
//Use cached data
|
||||||
|
|
Loading…
Add table
Reference in a new issue