changeset 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 f8a133d0b703
children 293fce53b5f9
files sidutil.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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