diff options
author | Burt P <pburt0@gmail.com> | 2018-09-23 18:38:15 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-09-23 16:49:42 -0700 |
commit | cbe1216feb4437168bdfa3135a8e04cd9806e2cb (patch) | |
tree | b32fd6e8363314cdda890f796d536ca7d5a1cb3c | |
parent | 3a51ab881647e60a6f8af76a8b111ae2bfe0e3cc (diff) |
computer/languages: fix crash when no other locales installed
Fix a crash when `locale -va` returns empty.
Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r-- | modules/computer/languages.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 & */ |