[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 09:27:48

  Modified:    .        o_text.c
  Log:
  Added some sanity checks in o_text_draw_lowlevel and o_text_draw functions.
  
  
  
  
  Revision  Changes    Path
  1.19      +13 -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.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- o_text.c	15 Jul 2006 18:51:41 -0000	1.18
  +++ o_text.c	21 Oct 2006 13:27:48 -0000	1.19
  @@ -52,6 +52,15 @@
   {
     int left, right, top, bottom;
   
  +  if (!o_current) {
  +    fprintf(stderr, _("o_text_draw_lowlevel: Called with NULL object!\n"));
  +    return;
  +  }
  +  if (!o_current->text) {
  +    fprintf(stderr, _("o_text_draw_lowlevel: Called with object without object->text pointer!\n"));
  +    return;
  +  }
  +
     if (o_current->visibility == INVISIBLE && w_current->show_hidden_text &&
         o_current->text->prim_objs == NULL) {
       o_text_recreate(w_current, o_current);
  @@ -195,6 +204,10 @@
       return;
     }
   
  +  if ((o_current->type != OBJ_TEXT) || (o_current->text == NULL)) {
  +    return;
  +  }
  +
     if (!w_current->fast_mousepan || !w_current->doing_pan) {
   
   #if 0 /* in prep for future performance enhancement... */
  
  
  


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