summaryrefslogtreecommitdiffstats
path: root/mp_msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'mp_msg.c')
-rw-r--r--mp_msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mp_msg.c b/mp_msg.c
index 593f4caf3a..99c587fb77 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -48,7 +48,8 @@ const char* filename_recode(const char* filename)
static char recoded_filename[MSGSIZE_MAX];
size_t filename_len, max_path;
char* precoded;
- if (!strcasecmp(mp_msg_charset, MSG_CHARSET) ||
+ if (!mp_msg_charset ||
+ !strcasecmp(mp_msg_charset, MSG_CHARSET) ||
!strcasecmp(mp_msg_charset, "noconv"))
return filename;
if (inv_msgiconv == (iconv_t)(-1)) {