Fixed a case of using new[]/delete[] when malloc/free should have been used.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-08-27 21:53:33 -03:00
parent b59e088d6c
commit 52b62e8620
3 changed files with 27 additions and 29 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ FormatHandler::DecodedImage STBHandler::decode(love::filesystem::FileData *data)
int comp = 0;
img.data = stbi_load_from_memory((const stbi_uc *) data->getData(),
(int) data->getSize(),
&img.width, &img.height,
&comp, 4);
&img.width, &img.height,
&comp, 4);
if (img.data == nullptr || img.width <= 0 || img.height <= 0)
throw love::Exception("Could not decode TGA or BMP image.");