From: Julian Smart Date: Wed, 10 Oct 2012 15:45:08 +0000 (+0000) Subject: Don't write text if it's empty X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4aa079bf561f378c5564717adb14665e5525358f Don't write text if it's empty git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 9b40064ee8..9d98c4fe64 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -3244,7 +3244,8 @@ void wxRichTextCtrl::Replace(long from, long to, SetDefaultStyle(attr); - DoWriteText(value, SetValue_SelectionOnly); + if (!value.IsEmpty()) + DoWriteText(value, SetValue_SelectionOnly); EndBatchUndo(); }