library: Fail on release builds when textures can't be loaded

This commit is contained in:
Antonio Niño Díaz 2022-10-29 01:32:23 +01:00
parent 452f953bc8
commit 96e7948970

View File

@ -112,10 +112,15 @@ int NE_MaterialTexLoadFAT(NE_Material *tex, NE_TextureFormat fmt,
NE_Assert(sizeX > 0 && sizeY > 0, "Size must be positive");
char *ptr = NE_FATLoadData(path);
NE_AssertPointer(ptr, "Couldn't load file from FAT");
if (ptr == NULL)
{
NE_DebugPrint("Couldn't load file from FAT");
return 0;
}
int ret = NE_MaterialTexLoad(tex, fmt, sizeX, sizeY, flags, (u8 *)ptr);
free(ptr);
return ret;
}