summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2008-12-02 12:20:17 +0000
committerLinus Walleij <triad@df.lth.se>2008-12-02 12:20:17 +0000
commitd8a2faec78f36a968cc2da53e2d75de29fab3355 (patch)
tree248ea106d29b5bb67911ab01ea31f31ec4cc336f
parente9b4e91bcc115fe25f2ff568e86f03ca37b512d6 (diff)
downloadlibmtp-d8a2faec78f36a968cc2da53e2d75de29fab3355.tar.gz
Another NULL check.
-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");