diff --git a/src/support/unicode.C b/src/support/unicode.C index aaee7fc8e1..9fbd818ee6 100644 --- a/src/support/unicode.C +++ b/src/support/unicode.C @@ -31,6 +31,9 @@ std::vector iconv_convert(std::string const & tocode, std::string const & fromcode, std::vector const & buf) { + if (buf.empty()) + return std::vector(); + iconv_t cd = iconv_open(tocode.c_str(), fromcode.c_str()); if (cd == (iconv_t)(-1)) { lyxerr << "Error returned from iconv_open" << endl;