From 93fe555876dc61c0542ed6bf8d1a204fb7f7e17b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 20 Sep 2002 23:00:08 +0000 Subject: [PATCH] no changes, really git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlpars.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 50b878f4da..5abb39fbd0 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -432,11 +432,15 @@ wxHtmlEntitiesParser::~wxHtmlEntitiesParser() void wxHtmlEntitiesParser::SetEncoding(wxFontEncoding encoding) { #if wxUSE_WCHAR_T && !wxUSE_UNICODE - if (encoding == m_encoding) return; + if (encoding == m_encoding) + return; + delete m_conv; - m_conv = NULL; + m_encoding = encoding; - if (m_encoding != wxFONTENCODING_SYSTEM) + if (m_encoding == wxFONTENCODING_SYSTEM) + m_conv = NULL; + else m_conv = new wxCSConv(wxFontMapper::GetEncodingName(m_encoding)); #else (void) encoding;