Skip empty rectangles in gfx cache to surface

This commit is contained in:
akallabeth 2022-10-21 09:36:46 +02:00 committed by David Fort
parent 498635a317
commit 3eccf75aff
1 changed files with 3 additions and 0 deletions

View File

@ -1411,6 +1411,9 @@ static UINT gdi_CacheToSurface(RdpgfxClientContext* context,
const RECTANGLE_16 rect = { destPt->x, destPt->y, destPt->x + cacheEntry->width,
destPt->y + cacheEntry->height };
if (rectangle_is_empty(&rect))
continue;
if (!is_rect_valid(&rect, surface->width, surface->height))
goto fail;