mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-26 16:07:31 +01:00
Don't crash attempting to scale zero-sized images
fixes minetest/minetest#12393
This commit is contained in:
parent
aa095d9525
commit
426730bf91
@ -183,7 +183,7 @@ void CImage::copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT fo
|
||||
return;
|
||||
}
|
||||
|
||||
if (!target || !width || !height)
|
||||
if (!target || !width || !height || !Size.Width || !Size.Height)
|
||||
return;
|
||||
|
||||
const u32 bpp=getBitsPerPixelFromFormat(format)/8;
|
||||
|
Loading…
Reference in New Issue
Block a user