STB errors traced
This commit is contained in:
+2
-1
@@ -1068,13 +1068,14 @@ BitmapBuffer * BitmapBuffer::load_stb(const char * filename)
|
|||||||
f_close(&imgFile);
|
f_close(&imgFile);
|
||||||
|
|
||||||
if (!img) {
|
if (!img) {
|
||||||
|
TRACE("load_stb(%s) failed: %s", filename, stbi_failure_reason());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert to RGB565 or ARGB4444 format
|
// convert to RGB565 or ARGB4444 format
|
||||||
BitmapBuffer * bmp = new BitmapBuffer(n == 4 ? BMP_ARGB4444 : BMP_RGB565, w, h);
|
BitmapBuffer * bmp = new BitmapBuffer(n == 4 ? BMP_ARGB4444 : BMP_RGB565, w, h);
|
||||||
if (bmp == nullptr) {
|
if (bmp == nullptr) {
|
||||||
TRACE("load_stb() malloc failed");
|
TRACE("load_stb(%s) malloc failed", filename);
|
||||||
stbi_image_free(img);
|
stbi_image_free(img);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user