Skip to content

Commit

Permalink
LinGui: fix crash when there is no iso639_1 code
Browse files Browse the repository at this point in the history
  • Loading branch information
jstebbins committed Apr 20, 2024
1 parent fbda4a2 commit fa6bad8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gtk/src/hb-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,16 @@ language_opts_set(signal_user_data_t *ud, const gchar *name,
for (iso639 = lang_get_next(NULL); iso639 != NULL;
iso639 = lang_get_next(iso639))
{
int index = lang_lookup_index(iso639->iso639_1);
int index;

if (iso639->iso639_1 != NULL && iso639->iso639_1[0] != 0)
{
index = lang_lookup_index(iso639->iso639_1);
}
else
{
index = lang_lookup_index(iso639->iso639_2);
}
gchar * lang;

if (iso639->native_name[0] != 0)
Expand Down

0 comments on commit fa6bad8

Please sign in to comment.