X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b4457965a0c0d0ef828dbf7cca3d2f947083054..39987096b3aa3e1bec4f69a5793780f7ea2dd914:/src/common/dobjcmn.cpp diff --git a/src/common/dobjcmn.cpp b/src/common/dobjcmn.cpp index 5ecf2fc088..cbed32d72f 100644 --- a/src/common/dobjcmn.cpp +++ b/src/common/dobjcmn.cpp @@ -238,7 +238,7 @@ size_t wxTextDataObject::GetDataSize(const wxDataFormat& format) const { wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() ); - return buffer ? strlen( buffer ) + 1 : 0; + return buffer ? strlen( buffer ) : 0; } bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const @@ -247,8 +247,6 @@ bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const return false; wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() ); - if ( buffer == NULL ) - return false; strcpy( (char*)buf, buffer ); @@ -262,8 +260,6 @@ bool wxTextDataObject::SetData(const wxDataFormat& format, return false; wxWCharBuffer buffer = GetConv(format).cMB2WX( (const char*)buf ); - if ( buffer == NULL ) - return false; SetText( buffer );