don't set CF_TEXT data in wxURLDataObject in Unicode build, this results in an assert

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-10-30 12:50:39 +00:00
parent 0a4090e635
commit b9a5faed6a

View File

@ -1249,11 +1249,15 @@ void wxURLDataObject::SetURL(const wxString& url)
if ( urlMB )
{
const size_t len = strlen(urlMB) + 1; // size with trailing NUL
#if !wxUSE_UNICODE
SetData(wxDF_TEXT, len, urlMB);
#endif
SetData(wxDataFormat(CFSTR_SHELLURL), len, urlMB);
}
#if wxUSE_UNICODE
SetData(wxDF_UNICODETEXT, url.length() + 1, url.wc_str());
#endif
}
// ----------------------------------------------------------------------------