[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: o_text.c



  User: cnieves 
  Date: 06/10/21 14:53:23

  Modified:    .        o_text.c
  Log:
  * src/o_text.c: Added sanity checks in o_text_draw_lowlevel and
  
  o_text_draw functions using GLib functions.
  
  
  
  
  Revision  Changes    Path
  1.23      +7 -0      eda/geda/gaf/gschem/src/o_text.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_text.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_text.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- o_text.c	21 Oct 2006 18:49:14 -0000	1.22
  +++ o_text.c	21 Oct 2006 18:53:23 -0000	1.23
  @@ -52,6 +52,9 @@
   {
     int left, right, top, bottom;
   
  +  g_return_if_fail (o_current != NULL);
  +  g_return_if_fail (o_current->text != NULL);
  +
     if (o_current->visibility == INVISIBLE && w_current->show_hidden_text &&
         o_current->text->prim_objs == NULL) {
       o_text_recreate(w_current, o_current);
  @@ -193,6 +196,10 @@
     int screen_x1, screen_y1;
     int small_dist, offset;
   
  +  g_return_if_fail (o_current != NULL);
  +  g_return_if_fail (o_current->type != OBJ_TEXT);
  +  g_return_if_fail (o_current->text != NULL);
  +
     if (o_current->visibility == INVISIBLE && !w_current->show_hidden_text) {
       return;
     }
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs