summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-07-27 08:34:34 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-07-27 08:34:34 +0200
commit12c8cd49882c8cdb684f782f9e8e18125fef0d08 (patch)
treec50f289de66d64126e1b2114ea1bbf11a91c5819 /src
parent7710084ba834517cb0a459ec9f37075fc9b0520a (diff)
downloadweechat-12c8cd49882c8cdb684f782f9e8e18125fef0d08.zip
core: check that string is not NULL in function string_iconv
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-string.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index b6ee3ee40..e29340298 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -2066,7 +2066,12 @@ string_iconv (int from_utf8, const char *from_code, const char *to_code,
char *ptr_inbuf_shift;
int done;
size_t err, inbytesleft, outbytesleft;
+#endif
+ if (!string)
+ return NULL;
+
+#ifdef HAVE_ICONV
if (from_code && from_code[0] && to_code && to_code[0]
&& (string_strcasecmp(from_code, to_code) != 0))
{