comparison 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
comparison
equal deleted inserted replaced
333:f8a133d0b703 334:1e7ffcaeb8ad
328 328
329 329
330 void sidutil_chconv_close(SIDUtilChConvCtx *ctx) 330 void sidutil_chconv_close(SIDUtilChConvCtx *ctx)
331 { 331 {
332 #ifdef HAVE_ICONV 332 #ifdef HAVE_ICONV
333 if (ctx->iconvCtx != (iconv_t) -1) 333 if (ctx->enabled)
334 iconv_close(ctx->iconvCtx); 334 iconv_close(ctx->iconvCtx);
335 #else 335 #else
336 #endif 336 #endif
337 337
338 th_free(ctx->outLang); 338 th_free(ctx->outLang);