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:
@@ -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));
|
||||
|
@@ -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):
|
||||
|
||||
|
Reference in New Issue
Block a user