Fix crash when copying Unicode URLs to the clipboard.
Closes #11014. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -121,6 +121,7 @@ All (GUI):
|
||||
|
||||
wxMSW:
|
||||
|
||||
- Fixed crash when copying Unicode URLs to the clipboard (Tim Kosse).
|
||||
- Fixed generation of wxEVT_CHAR_HOOK events.
|
||||
- Implement wxFileName::SetTimes() for directories (Steve Lamerton).
|
||||
- Correct wxTopLevelWindow::SetShape() for windows with menu bar (Peter Friis).
|
||||
|
@@ -1264,8 +1264,12 @@ void wxURLDataObject::SetURL(const wxString& url)
|
||||
|
||||
// CFSTR_SHELLURL is always supposed to be ANSI...
|
||||
wxWX2MBbuf urlA = (wxWX2MBbuf)url.mbc_str();
|
||||
size_t len = strlen(urlA);
|
||||
SetData(wxDataFormat(CFSTR_SHELLURL), len+1, (const char*)urlA);
|
||||
if ( url )
|
||||
{
|
||||
size_t len = strlen(urlA);
|
||||
SetData(wxDataFormat(CFSTR_SHELLURL), len+1, (const char*)urlA);
|
||||
}
|
||||
//else: we can't represent this URL in the current code page
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user