Some security checks on font loading

This commit is contained in:
Ray
2018-10-18 17:48:01 +02:00
parent 8c7bd96b19
commit 16193a35b0
2 changed files with 7 additions and 7 deletions

View File

@ -894,9 +894,12 @@ RAYGUIDEF void GuiUnlock(void) { guiState = NORMAL; }
// Define custom gui font
RAYGUIDEF void GuiFont(Font font)
{
guiFont = font;
style[DEFAULT_TEXT_SIZE] = font.baseSize;
style[DEFAULT_TEXT_SPACING] = 1;
if (font.texture.id > 0)
{
guiFont = font;
style[DEFAULT_TEXT_SIZE] = font.baseSize;
style[DEFAULT_TEXT_SPACING] = 1;
}
}
// Set gui controls alpha global state