]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Don't write text if it's empty
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index 9b40064ee808dfdf0a654a1a0fbb16e390530fd2..9d98c4fe644e4540ac1ba0e20ca20ca7eb6b927b 100644 (file)
@@ -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();
 }