aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/e-iconv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index 7e79d430b5..fdd66fa956 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -319,6 +319,10 @@ iconv_t e_iconv_open(const char *oto, const char *ofrom)
to = e_iconv_charset_name(oto);
from = e_iconv_charset_name(ofrom);
+ if (to == NULL)
+ to = "";
+ if (from == NULL)
+ from = "";
tofrom = alloca(strlen(to) +strlen(from) + 2);
sprintf(tofrom, "%s%%%s", to, from);