Code

Updated the logic in charset_close(), why free stuff that isnt allocated.
authorKalle Wallin <kaw@linux.se>
Fri, 26 Mar 2004 11:06:29 +0000 (11:06 +0000)
committerKalle Wallin <kaw@linux.se>
Fri, 26 Mar 2004 11:06:29 +0000 (11:06 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@496 09075e82-0dd4-0310-85a5-a0d7c8717e4f

support.c

index d7c196a9402f55d2eae09db23b69f2fa577227c8..9bf18cc47a8353546652ab3edc189c6b48cd7e22 100644 (file)
--- a/support.c
+++ b/support.c
@@ -166,12 +166,12 @@ int
 charset_close(void)
 {
 #ifdef HAVE_ICONV
-  if( iconv_from_uft8 == (iconv_t)(-1) )
+  if( iconv_from_uft8 != (iconv_t)(-1) )
     {
       iconv_close(iconv_from_uft8);
       iconv_from_uft8 = (iconv_t)(-1);
     }
-  if( iconv_to_uft8 == (iconv_t)(-1) )
+  if( iconv_to_uft8 != (iconv_t)(-1) )
     {
       iconv_close(iconv_to_uft8);
       iconv_to_uft8 = (iconv_t)(-1);