From cbe1216feb4437168bdfa3135a8e04cd9806e2cb Mon Sep 17 00:00:00 2001 From: Burt P Date: Sun, 23 Sep 2018 18:38:15 -0500 Subject: computer/languages: fix crash when no other locales installed Fix a crash when `locale -va` returns empty. Signed-off-by: Burt P --- modules/computer/languages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/computer/languages.c b/modules/computer/languages.c index 3d141e02..954f5b20 100644 --- a/modules/computer/languages.c +++ b/modules/computer/languages.c @@ -162,7 +162,7 @@ scan_languages(OperatingSystem * os) } while (0); } else if (strstr(p, "------")) { /* do nothing */ - } else { + } else if (curr) { /* a blank line is the end of a locale */ gchar *li_str = locale_info_section(curr); gchar *clean_title = hardinfo_clean_value(curr->title, 0); /* may contain & */ -- cgit v1.2.3