mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
Update wx to r75363 to address a wx bug that was breaking netplay on OS X.
This commit is contained in:
19
Externals/wxWidgets3/include/wx/buffer.h
vendored
19
Externals/wxWidgets3/include/wx/buffer.h
vendored
@ -268,9 +268,22 @@ public:
|
||||
|
||||
wxCharTypeBuffer(size_t len)
|
||||
{
|
||||
this->m_data =
|
||||
new Data((CharType *)malloc((len + 1)*sizeof(CharType)), len);
|
||||
this->m_data->Get()[len] = (CharType)0;
|
||||
CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType));
|
||||
if ( str )
|
||||
{
|
||||
str[len] = (CharType)0;
|
||||
|
||||
// There is a potential memory leak here if new throws because it
|
||||
// fails to allocate Data, we ought to use new(nothrow) here, but
|
||||
// this might fail to compile under some platforms so until this
|
||||
// can be fully tested, just live with this (rather unlikely, as
|
||||
// Data is a small object) potential leak.
|
||||
this->m_data = new Data(str, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_data = this->GetNullData();
|
||||
}
|
||||
}
|
||||
|
||||
wxCharTypeBuffer(const wxCharTypeBuffer& src)
|
||||
|
Reference in New Issue
Block a user