git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34873
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
else // == wxDF_TEXT
{
wxCharBuffer buffer = wxConvLibc.cWX2MB( GetText().c_str() );
else // == wxDF_TEXT
{
wxCharBuffer buffer = wxConvLibc.cWX2MB( GetText().c_str() );
- return strlen( (const char*) buffer ) + 1;
+ // in some cases "buffer" is null (e.g. Mac OS X)
+ return buffer ? strlen( (const char*) buffer ) + 1 : 0;
else
{
wxCharBuffer buffer = wxConvLibc.cWX2MB( GetText().c_str() );
else
{
wxCharBuffer buffer = wxConvLibc.cWX2MB( GetText().c_str() );
- strcpy( (char*) buf, (const char*) buffer );
+ // in some cases "buffer" is null (e.g. Mac OS X)
+ if (buffer)
+ strcpy( (char*) buf, (const char*) buffer );