fixed crash in wxGetCharacterSet when not using iconv

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-01-26 12:31:55 +00:00
parent 83665b8122
commit 734eda8ab9

View File

@@ -933,11 +933,17 @@ static wxCharacterSet *wxGetCharacterSet(const wxChar *name)
#endif // HAVE_ICONV/!HAVE_ICONV
}
if ( cset->usable() )
return cset;
// it can only be NULL in this case
#ifndef HAVE_ICONV
if ( cset )
#endif // !HAVE_ICONV
{
if ( cset->usable() )
return cset;
delete cset;
cset = NULL;
delete cset;
cset = NULL;
}
#if defined(__WIN32__) && !defined(__WXMICROWIN__)
cset = new CP_CharSet(name);