diff --git a/eglib/src/gunicode.c b/eglib/src/gunicode.c index af11774446494188c84b0cbfc9baa580681d883e..64315a4f081d3572547ec0fcddcc4366b061f409 100644 --- a/eglib/src/gunicode.c +++ b/eglib/src/gunicode.c @@ -217,8 +217,10 @@ g_convert (const gchar *str, gssize len, convertor = iconv_open (to_codeset, from_codeset); if (convertor == (iconv_t) -1){ - *bytes_written = 0; - *bytes_read = 0; + if (bytes_written) + *bytes_written = 0; + if (bytes_read) + *bytes_read = 0; return NULL; }