diff sidutil.c @ 334:1e7ffcaeb8ad

Check SIDUtilChConvCtx::enabled instead of SIDUtilChConvCtx::iconvCtx != -1 when calling iconv_close().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 13 Jan 2020 13:38:06 +0200
parents f3ba2ba894b1
children a6153837c138
line wrap: on
line diff
--- 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