diff --git a/src/doc/algorithm/rotsprite.cpp b/src/doc/algorithm/rotsprite.cpp index 152d0cb1b..06f693d99 100644 --- a/src/doc/algorithm/rotsprite.cpp +++ b/src/doc/algorithm/rotsprite.cpp @@ -179,6 +179,9 @@ void rotsprite_image(Image* bmp, const Image* spr, const Image* mask, int rot_width = xmax - xmin; int rot_height = ymax - ymin; + if (rot_width == 0 || rot_height == 0) + return; + int scale = 8; base::UniquePtr bmp_copy(Image::create(bmp->pixelFormat(), rot_width*scale, rot_height*scale, buf[0])); base::UniquePtr tmp_copy(Image::create(spr->pixelFormat(), spr->width()*scale, spr->height()*scale, buf[1]));