From d2be15217a0f114b2aaa3a9759c1cebeba670011 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 21 Dec 2005 20:19:14 +0000 Subject: [PATCH] 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 --- src/msw/textctrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index a04437dc77..aeba2610d9 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -895,6 +895,9 @@ void wxTextCtrl::WriteText(const wxString& value) void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly) { + if ( value.empty() ) + return; + wxString valueDos; if ( m_windowStyle & wxTE_MULTILINE ) valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);