Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: ensure that at least one preferred language is set (defaults …
…to eng)
  • Loading branch information
perexg committed May 29, 2015
1 parent b06e241 commit 807b9c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.c
Expand Up @@ -1564,7 +1564,10 @@ config_set_int ( const char *fld, int val )

const char *config_get_language ( void )
{
return htsmsg_get_str(config, "language");
const char *s = htsmsg_get_str(config, "language");
if (s == NULL || *s == '\0')
return "eng";
return s;
}

int config_set_language ( const char *lang )
Expand Down

0 comments on commit 807b9c8

Please sign in to comment.