]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't write text if it's empty
authorJulian Smart <julian@anthemion.co.uk>
Wed, 10 Oct 2012 15:45:08 +0000 (15:45 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 10 Oct 2012 15:45:08 +0000 (15:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 9b40064ee808dfdf0a654a1a0fbb16e390530fd2..9d98c4fe644e4540ac1ba0e20ca20ca7eb6b927b 100644 (file)
@@ -3244,7 +3244,8 @@ void wxRichTextCtrl::Replace(long from, long to,
 
     SetDefaultStyle(attr);
 
 
     SetDefaultStyle(attr);
 
-    DoWriteText(value, SetValue_SelectionOnly);
+    if (!value.IsEmpty())
+        DoWriteText(value, SetValue_SelectionOnly);
 
     EndBatchUndo();
 }
 
     EndBatchUndo();
 }