DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2783
Version: 1.3-current


With the attached patch that checks if NULL is passed and set the parameter
to an empty string there is no segfault and I think the desired result is
achieved (clear the buffer content).


Link: http://www.fltk.org/str.php?L2783
Version: 1.3-current
Index: Fl_Text_Buffer.cxx
===================================================================
--- Fl_Text_Buffer.cxx  (revision 9190)
+++ Fl_Text_Buffer.cxx  (working copy)
@@ -164,6 +164,7 @@
  */
 void Fl_Text_Buffer::text(const char *t)
 {
+  if(!t) t = "";
   IS_UTF8_ALIGNED(t)
   
   call_predelete_callbacks(0, length());
_______________________________________________
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to