mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
TextDrawerAndroid: Handle a null fontName, saw some crash reports that looked like that.
This commit is contained in:
parent
0d0b0fc60b
commit
ac88e73768
@ -47,7 +47,7 @@ bool TextDrawerAndroid::IsReady() const {
|
||||
uint32_t TextDrawerAndroid::SetFont(const char *fontName, int size, int flags) {
|
||||
// We will only use the default font but just for consistency let's still involve
|
||||
// the font name.
|
||||
uint32_t fontHash = hash::Adler32((const uint8_t *)fontName, strlen(fontName));
|
||||
uint32_t fontHash = fontName ? hash::Adler32((const uint8_t *)fontName, strlen(fontName)) : 1337;
|
||||
fontHash ^= size;
|
||||
fontHash ^= flags << 10;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user