summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--examples/util.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ebd2e7..a15ee7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-02 Linus Walleij <triad@df.lth.se>
+
+ * examples/util.c: another NULL check.
+
2008-11-25 Linus Walleij <triad@df.lth.se>
* src/libmtp.c: fix a bug on handling folder children with an illegal
diff --git a/examples/util.c b/examples/util.c
index 1e2cf01..f71f722 100644
--- a/examples/util.c
+++ b/examples/util.c
@@ -53,7 +53,9 @@ void checklang(void)
}
}
#endif
- if (strcmp(langsuff, "UTF-8")) {
+ if (langsuff == NULL) {
+ printf("Could not determine language suffix for your system. Please check your setup!\n");
+ } else if (strcmp(langsuff, "UTF-8")) {
printf("Your system does not appear to have UTF-8 enabled ($LANG=\"%s\")\n", lang);
printf("If you want to have support for diacritics and Unicode characters,\n");
printf("please switch your locale to an UTF-8 locale, e.g. \"en_US.UTF-8\".\n");