mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-09 01:55:33 +00:00
Fix assert to not cause warning in release and do some sane things...
This commit is contained in:
parent
956a5dcd9d
commit
ba202c6ce9
|
@ -156,7 +156,13 @@ bool ImageLoaderPNG::ReadData() {
|
||||||
png_colorp palette;
|
png_colorp palette;
|
||||||
int nPaletteEntries;
|
int nPaletteEntries;
|
||||||
png_uint_32 ret = png_get_PLTE(png_ptr, info_ptr, &palette, &nPaletteEntries);
|
png_uint_32 ret = png_get_PLTE(png_ptr, info_ptr, &palette, &nPaletteEntries);
|
||||||
assert(ret == PNG_INFO_PLTE);
|
if(ret != PNG_INFO_PLTE) {
|
||||||
|
memset(m_BlueData, 0, numPixels);
|
||||||
|
memset(m_RedData, 0, numPixels);
|
||||||
|
memset(m_GreenData, 0, numPixels);
|
||||||
|
assert(!"Couldn't find PLTE chunk");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for(uint32 i = 0; i < m_Height; i++) {
|
for(uint32 i = 0; i < m_Height; i++) {
|
||||||
png_read_row(png_ptr, rowData, NULL);
|
png_read_row(png_ptr, rowData, NULL);
|
||||||
|
|
Loading…
Reference in a new issue