diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-16 23:30:46 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-16 23:30:46 +0000 |
commit | da16158c0a342aa0a0f9df286eff3091a9cb8083 (patch) | |
tree | 405190c8496631b3cd50bfd30070b111dd6a53f7 | |
parent | 2a6b4b79b069cf7f631e619781ba5e1baf50099c (diff) | |
download | netsurf-da16158c0a342aa0a0f9df286eff3091a9cb8083.tar.gz netsurf-da16158c0a342aa0a0f9df286eff3091a9cb8083.tar.bz2 |
[project @ 2006-03-16 23:30:46 by dsilvers]
Fix another assumption that freeing/dupping/whatever a NULL is safe.
svn path=/import/netsurf/; revision=2132
-rw-r--r-- | utils/utf8.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/utf8.c b/utils/utf8.c index 5425505ef..ea9f8c85f 100644 --- a/utils/utf8.c +++ b/utils/utf8.c @@ -298,7 +298,8 @@ utf8_convert_ret utf8_convert(const char *string, size_t len, } /* close the last cd - we don't care if this fails */ - iconv_close(last_cd.cd); + if (last_cd.cd) + iconv_close(last_cd.cd); /* and copy the to/from/cd data into last_cd */ strncpy(last_cd.from, from, 32); |