mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fix a bug in the png renderer of the software renderer with decals: if the palette remap is missing, don't attempt to use it. (fix null pointer)
This commit is contained in:
parent
dfd5726eb0
commit
28f7728980
1 changed files with 2 additions and 1 deletions
|
@ -360,7 +360,8 @@ void FPNGTexture::ReadAlphaRemap(FileReader *lump, uint8_t *alpharemap)
|
||||||
uint8_t r = lump->ReadUInt8();
|
uint8_t r = lump->ReadUInt8();
|
||||||
uint8_t g = lump->ReadUInt8();
|
uint8_t g = lump->ReadUInt8();
|
||||||
uint8_t b = lump->ReadUInt8();
|
uint8_t b = lump->ReadUInt8();
|
||||||
alpharemap[i] = PaletteMap[i] == 0 ? 0 : Luminance(r, g, b);
|
int ti = PaletteMap ? PaletteMap[i] : i;
|
||||||
|
alpharemap[i] = ti == 0 ? 0 : Luminance(r, g, b);
|
||||||
}
|
}
|
||||||
lump->Seek(p, FileReader::SeekSet);
|
lump->Seek(p, FileReader::SeekSet);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue