fix for a crash due to using NULL inputConv in Unicode build introduced in rev 1.162
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
43dc5fb140
commit
f15fa3a93f
@ -1254,14 +1254,23 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
|
||||
if ( convertEncoding )
|
||||
{
|
||||
if ( m_charset.empty() )
|
||||
{
|
||||
inputConv = wxConvCurrent;
|
||||
}
|
||||
else
|
||||
{
|
||||
inputConv =
|
||||
csConv = new wxCSConv(m_charset);
|
||||
}
|
||||
}
|
||||
else // no conversion needed
|
||||
else // no need to convert the encoding
|
||||
{
|
||||
// we still need the conversion for Unicode build
|
||||
#if wxUSE_UNICODE
|
||||
inputConv = wxConvCurrent;
|
||||
#else // !wxUSE_UNICODE
|
||||
inputConv = NULL;
|
||||
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||
}
|
||||
|
||||
// conversion to apply to msgid strings before looking them up: we only
|
||||
@ -1315,11 +1324,11 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
|
||||
wxString msgid(data, *inputConv);
|
||||
#else // ASCII
|
||||
wxString msgid;
|
||||
#if wxUSE_WCHAR_T
|
||||
if ( inputConv && sourceConv )
|
||||
msgid = wxString(inputConv->cMB2WC(data), *sourceConv);
|
||||
else
|
||||
#endif
|
||||
#if wxUSE_WCHAR_T
|
||||
if ( inputConv && sourceConv )
|
||||
msgid = wxString(inputConv->cMB2WC(data), *sourceConv);
|
||||
else
|
||||
#endif
|
||||
msgid = data;
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user