gEDA-bug: [ geda-Bugs-1803259 ] NULL pointer access x_image.c -> image_type_descr

SourceForge.net noreply at sourceforge.net
Thu Sep 27 02:32:00 EDT 2007


Bugs item #1803259, was opened at 2007-09-26 23:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818426&aid=1803259&group_id=161080

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: gschem
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: NULL pointer access x_image.c -> image_type_descr

Initial Comment:
this should fix the problem:

  /* Get the current image type */
#if ((GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION < 6))
  GSList *ptr;
  /* If GTK < 2.6, get the description from the descriptions list */
  ptr = g_slist_nth(image_type_descriptions,
		   gtk_combo_box_get_active(GTK_COMBO_BOX(combo)));


//-->> THIS
  if(ptr == NULL)
    image_type_descr = NULL;
  else
    image_type_descr = (char *) (ptr->data);
//-->> THIS

#else
  image_type_descr = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
#endif
  image_type = x_image_get_type_from_description(image_type_descr);


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818426&aid=1803259&group_id=161080


More information about the geda-bug mailing list