diff options
author | Linus Walleij <triad@df.lth.se> | 2008-12-02 12:20:17 +0000 |
---|---|---|
committer | Linus Walleij <triad@df.lth.se> | 2008-12-02 12:20:17 +0000 |
commit | d8a2faec78f36a968cc2da53e2d75de29fab3355 (patch) | |
tree | 248ea106d29b5bb67911ab01ea31f31ec4cc336f | |
parent | e9b4e91bcc115fe25f2ff568e86f03ca37b512d6 (diff) | |
download | libmtp-d8a2faec78f36a968cc2da53e2d75de29fab3355.tar.gz |
Another NULL check.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | examples/util.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -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"); |