public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
 * shoes/ruby.c: EditBox.text= and EditLine.text= crasher, found by paulv on 
 shoes daaaaayyy
why (author)
Fri Jul 11 12:38:30 -0700 2008
commit  5036fd6d46b6d3f23b6ce9b5751f0277c25db3c4
tree    3ba2141455c3c1576ca33fa355e00fd219f3cf9e
parent  0d1c48287fed8bca4ab68f31d09488c9fb7ff9be
...
2913
2914
2915
 
2916
2917
2918
 
2919
2920
2921
...
2962
2963
2964
 
2965
2966
2967
 
2968
2969
2970
...
2913
2914
2915
2916
2917
2918
 
2919
2920
2921
2922
...
2963
2964
2965
2966
2967
2968
 
2969
2970
2971
2972
0
@@ -2913,9 +2913,10 @@ shoes_edit_line_set_text(VALUE self, VALUE text)
0
   if (!NIL_P(text))
0
   {
0
     text = shoes_native_to_s(text);
0
+    ATTRSET(self_t->attr, text, text);
0
     msg = RSTRING_PTR(text);
0
   }
0
-  shoes_native_edit_line_set_text(self_t->ref, msg);
0
+  if (self_t->ref != NULL) shoes_native_edit_line_set_text(self_t->ref, msg);
0
   return text;
0
 }
0
 
0
@@ -2962,9 +2963,10 @@ shoes_edit_box_set_text(VALUE self, VALUE text)
0
   if (!NIL_P(text))
0
   {
0
     text = shoes_native_to_s(text);
0
+    ATTRSET(self_t->attr, text, text);
0
     msg = RSTRING_PTR(text);
0
   }
0
-  shoes_native_edit_box_set_text(self_t->ref, msg);
0
+  if (self_t->ref != NULL) shoes_native_edit_box_set_text(self_t->ref, msg);
0
   return text;
0
 }
0
 

Comments