Merge pull request #1669 from heuripedes/master

Fix sigsegv and improve font fallback logic
This commit is contained in:
Twinaphex 2015-05-03 03:28:28 +02:00
commit 42d044a51f
2 changed files with 3 additions and 3 deletions

View File

@ -87,6 +87,9 @@ bool font_init_first(const void **font_driver, void **font_handle,
void *video_data, const char *font_path, float font_size,
enum font_driver_render_api api)
{
if (font_path && !font_path[0])
font_path = NULL;
switch (api)
{
#ifdef HAVE_D3D

View File

@ -179,9 +179,6 @@ bool menu_display_init_main_font(menu_handle_t *menu,
if (menu->font.buf)
menu_display_free_main_font(menu);
if (!font_path[0])
font_path = NULL;
result = menu_display_font_init_first(
(const void**)&driver->font_osd_driver, &menu->font.buf, video,
font_path, font_size);