mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 04:13:50 +00:00
Fix assert failing when drawing an image with empty source bounds
This commit is contained in:
parent
c910efe2f4
commit
705cc3af50
@ -53,6 +53,9 @@ void GraphicsContext::drawImage(const doc::Image* img,
|
||||
const gfx::Rect& srcRc,
|
||||
const gfx::Rect& dstRc)
|
||||
{
|
||||
if (srcRc.isEmpty() || dstRc.isEmpty())
|
||||
return; // Do nothing for empty rectangles
|
||||
|
||||
auto tmpSurface = os::instance()->makeRgbaSurface(srcRc.w, srcRc.h);
|
||||
if (tmpSurface) {
|
||||
convert_image_to_surface(
|
||||
|
Loading…
Reference in New Issue
Block a user