mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-16 07:20:25 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target || !width || !height)
|
if (!target || !width || !height || !Size.Width || !Size.Height)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const u32 bpp=getBitsPerPixelFromFormat(format)/8;
|
const u32 bpp=getBitsPerPixelFromFormat(format)/8;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user