]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed crash in iconv_close() as well
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Jan 2002 15:42:07 +0000 (15:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Jan 2002 15:42:07 +0000 (15:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

index 41e50679a59771c8da6f33c5fd791546aae1cf42..1f736fe8cd45f1f7e3e58accfc667957c573da16 100644 (file)
@@ -600,10 +600,11 @@ private:
 
     // true if the wide char encoding we use (i.e. ms_wcCharsetName) has
     // different endian-ness than the native one
-    static bool ms_wcNeedsSwap = FALSE;
+    static bool ms_wcNeedsSwap;
 };
 
 const char *IC_CharSet::ms_wcCharsetName = NULL;
+bool IC_CharSet::ms_wcNeedsSwap = FALSE;
 
 IC_CharSet::IC_CharSet(const wxChar *name)
           : wxCharacterSet(name)
@@ -678,6 +679,10 @@ IC_CharSet::IC_CharSet(const wxChar *name)
     {
         w2m = iconv_open(wxConvLibc.cWX2MB(name), ms_wcCharsetName);
     }
+    else
+    {
+        w2m = (iconv_t)-1;
+    }
 }
 
 IC_CharSet::~IC_CharSet()