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

Re: gEDA-user: Segfault in PS hid -> patch



> -  fprintf (f, "showpage\n");
> +  if (f)
> +    fprintf (f, "showpage\n");

The right place to do this test is at the beginning of the function.
There are a lot of other printfs in that function that you didn't fix,
but one check at the beginning should cover them all.

>  	  f = psopen (filename, layer_type_to_file_name (idx));
> +	  if (!f)
> +	  {
> +	    perror(filename);
> +	    return 0;
> +	  }
> +		  

We should use the Message() function so that the message pops up
instead of just going to the console.


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