be more forgiving in opengl mode when a font color isn't available and use the default font

This commit is contained in:
Tim Felgentreff 2015-10-25 18:25:27 +01:00
parent ccdd49042f
commit c8b935b322

View file

@ -463,7 +463,14 @@ CGraphic *CFont::GetFontColorGraphic(const CFontColor &fontColor) const
{
#if defined(USE_OPENGL) || defined(USE_GLES)
if (UseOpenGL) {
return FontColorGraphics[this][&fontColor];
CGraphic* fontColorG = FontColorGraphics[this][&fontColor];
if (!fontColorG) {
#ifdef DEBUG
fprintf(stderr, "Could not load font color %s for font %s\n", fontColor.Ident, this->Ident);
#endif
return this->G;
}
return fontColorG;
} else
#endif
{