mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 14:12:26 -05:00
if font_glyphs_to_bufsize() returns 0 it means the font couldnt be loaded, so allocating the buffer size is pointless
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30512 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8ec2873fba
commit
edf06b7324
1 changed files with 3 additions and 3 deletions
|
|
@ -96,11 +96,11 @@ int skin_font_load(char* font_name, int glyphs)
|
||||||
glyphs = GLYPHS_TO_CACHE;
|
glyphs = GLYPHS_TO_CACHE;
|
||||||
#ifndef __PCTOOL__
|
#ifndef __PCTOOL__
|
||||||
skin_font_size = font_glyphs_to_bufsize(filename, glyphs);
|
skin_font_size = font_glyphs_to_bufsize(filename, glyphs);
|
||||||
|
#else
|
||||||
|
skin_font_size = 1;
|
||||||
#endif
|
#endif
|
||||||
if ( !skin_font_size )
|
if ( !skin_font_size )
|
||||||
{
|
return -1;
|
||||||
skin_font_size = SKIN_FONT_SIZE;
|
|
||||||
}
|
|
||||||
pf->buffer_start = (char*)skin_buffer_alloc(skin_font_size);
|
pf->buffer_start = (char*)skin_buffer_alloc(skin_font_size);
|
||||||
if (!pf->buffer_start)
|
if (!pf->buffer_start)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue