mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-16 05:42:32 +00:00
Fix crash generating thumbnails for certain sprites w/cels in specific positions
This commit is contained in:
parent
5b782dc27e
commit
51fa0d471e
@ -432,6 +432,8 @@ void composite_image_general(
|
|||||||
int(std::ceil(area.dstBounds().h)));
|
int(std::ceil(area.dstBounds().h)));
|
||||||
gfx::RectF srcBounds = area.srcBounds();
|
gfx::RectF srcBounds = area.srcBounds();
|
||||||
|
|
||||||
|
dstBounds &= dst->bounds();
|
||||||
|
|
||||||
int dstY = dstBounds.y;
|
int dstY = dstBounds.y;
|
||||||
double srcXStart = srcBounds.x / sx;
|
double srcXStart = srcBounds.x / sx;
|
||||||
double srcXDelta = 1.0 / sx;
|
double srcXDelta = 1.0 / sx;
|
||||||
@ -446,6 +448,7 @@ void composite_image_general(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
ASSERT(srcY >= 0 && srcY < src->height());
|
ASSERT(srcY >= 0 && srcY < src->height());
|
||||||
|
ASSERT(dstY >= 0 && dstY < dst->height());
|
||||||
|
|
||||||
auto dstPtr = get_pixel_address_fast<DstTraits>(dst, dstBounds.x, dstY);
|
auto dstPtr = get_pixel_address_fast<DstTraits>(dst, dstBounds.x, dstY);
|
||||||
auto srcPtr = get_pixel_address_fast<SrcTraits>(src, int(srcX), srcY);
|
auto srcPtr = get_pixel_address_fast<SrcTraits>(src, int(srcX), srcY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user