fix crash when copying empty selection to clipboard (#4783)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-06-15 11:45:05 +00:00
parent 315ed474f2
commit d740f112a5
2 changed files with 3 additions and 0 deletions

View File

@@ -537,6 +537,8 @@ void ScintillaWX::Paste() {
void ScintillaWX::CopyToClipboard(const SelectionText& st) {
#if wxUSE_CLIPBOARD
if ( !st.len )
return;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(false);
wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len-1));

View File

@@ -136,6 +136,7 @@ All (GUI):
- wxHTML: preserve TAB characters when copying <pre> content to clipboard.
- Set focus to wxCalendarCtrl when it is clicked.
- Don't clear the list control when wxLC_[HV]RULES style is toggled.
- Don't crash when Ctrl-Shift-T is pressed in empty wxStyledTextControl.
All (Unix):