Various fixes

Former-commit-id: bc799bb6b028f94a57c30dad8563367ab8a89973 [formerly 6c3e07c34170a8df0a4465d80cdfe9e5b8e04087]
Former-commit-id: e685bae1b31f698856efaf66d7bab8d96cb047f8
This commit is contained in:
Gawaboumga
2016-07-28 19:22:41 +02:00
parent 3bffbcd1e3
commit 4c1c8dd2a9
26 changed files with 141 additions and 126 deletions

View File

@@ -1352,6 +1352,15 @@ namespace Nz
void Image::Copy(UInt8* destination, const UInt8* source, PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth, unsigned int dstWidth, unsigned int dstHeight, unsigned int srcWidth, unsigned int srcHeight)
{
#if NAZARA_UTILITY_SAFE
if (width == 0)
NazaraError("Width must be greater than zero");
if (height == 0)
NazaraError("Height must be greater than zero");
if (depth == 0)
NazaraError("Depth must be greater than zero");
#endif
if (dstWidth == 0)
dstWidth = width;