forked from Mirrorlandia_minetest/irrlicht
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