[Horus] Malloc check added

This commit is contained in:
Bertrand Songis
2017-01-22 21:41:06 +01:00
parent fb6c9cde6b
commit 2f0492cec5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -617,7 +617,7 @@ BitmapBuffer * BitmapBuffer::load_bmp(const char * filename)
}
BitmapBuffer * bmp = new BitmapBuffer(BMP_RGB565, w, h);
if (bmp == NULL) {
if (bmp == NULL || bmp->getData() == NULL) {
f_close(&imgFile);
return NULL;
}