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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user