From 405d8f465740a78d2d19a2b108ac8fd65ff1a5e2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Jan 2002 15:42:07 +0000 Subject: [PATCH] fixed crash in iconv_close() as well git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/strconv.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 41e50679a5..1f736fe8cd 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -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() -- 2.45.2