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:
@@ -1249,11 +1249,15 @@ void wxURLDataObject::SetURL(const wxString& url)
|
|||||||
if ( urlMB )
|
if ( urlMB )
|
||||||
{
|
{
|
||||||
const size_t len = strlen(urlMB) + 1; // size with trailing NUL
|
const size_t len = strlen(urlMB) + 1; // size with trailing NUL
|
||||||
|
#if !wxUSE_UNICODE
|
||||||
SetData(wxDF_TEXT, len, urlMB);
|
SetData(wxDF_TEXT, len, urlMB);
|
||||||
|
#endif
|
||||||
SetData(wxDataFormat(CFSTR_SHELLURL), len, urlMB);
|
SetData(wxDataFormat(CFSTR_SHELLURL), len, urlMB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
SetData(wxDF_UNICODETEXT, url.length() + 1, url.wc_str());
|
SetData(wxDF_UNICODETEXT, url.length() + 1, url.wc_str());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user