Fix for Bug #1387359, bail out early from DoWriteText if the string is empty.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2005-12-21 20:19:14 +00:00
parent fbc1d11bde
commit d2be15217a

View File

@ -895,6 +895,9 @@ void wxTextCtrl::WriteText(const wxString& value)
void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly) void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
{ {
if ( value.empty() )
return;
wxString valueDos; wxString valueDos;
if ( m_windowStyle & wxTE_MULTILINE ) if ( m_windowStyle & wxTE_MULTILINE )
valueDos = wxTextFile::Translate(value, wxTextFileType_Dos); valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);