- wxCharBuffer tmp(len + 1);
- m_input->Read(tmp.data(), len);
- tmp.data()[len] = '\0';
- wxString ret(m_conv->cMB2WX(tmp.data()));
+ wxCharBuffer tmp(len + 1);
+ if ( tmp )
+ {
+ m_input->Read(tmp.data(), len);
+ tmp.data()[len] = '\0';
+ ret = m_conv->cMB2WX(tmp.data());
+ }