From d58d62401ef755a6a5ec1b559a23f8420d38d1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 24 May 2015 10:20:21 -0700 Subject: [PATCH] Added texture size check. --- src/bgfx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 638c843a..1137ee04 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -2508,6 +2508,7 @@ again: TextureHandle createTexture2D(uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags, const Memory* _mem) { + BX_CHECK(_width > 0 && _height > 0, "Invalid texture size (width %d, height %d).", _width, _height); return createTexture2D(BackbufferRatio::Count, _width, _height, _numMips, _format, _flags, _mem); }