# HG changeset patch # User Matti Hamalainen # Date 1578915486 -7200 # Node ID 1e7ffcaeb8adac9c7501869431815e9bc030ade2 # Parent f8a133d0b70305538c8fa1068c82f0b8cb807ad6 Check SIDUtilChConvCtx::enabled instead of SIDUtilChConvCtx::iconvCtx != -1 when calling iconv_close(). diff -r f8a133d0b703 -r 1e7ffcaeb8ad sidutil.c --- a/sidutil.c Mon Jan 13 13:37:25 2020 +0200 +++ b/sidutil.c Mon Jan 13 13:38:06 2020 +0200 @@ -330,7 +330,7 @@ void sidutil_chconv_close(SIDUtilChConvCtx *ctx) { #ifdef HAVE_ICONV - if (ctx->iconvCtx != (iconv_t) -1) + if (ctx->enabled) iconv_close(ctx->iconvCtx); #else #endif