From: <ai...@us...> - 2010-07-27 22:24:22
|
Revision: 11110 http://plplot.svn.sourceforge.net/plplot/?rev=11110&view=rev Author: airwin Date: 2010-07-27 22:24:16 +0000 (Tue, 27 Jul 2010) Log Message: ----------- Get rid of segfault when libhpdf (from the libharu project) produces an error. Also, get rid of circular plexit call caused by plend calling more libhpdf functions after an error was detected. Modified Paths: -------------- trunk/drivers/pdf.c Modified: trunk/drivers/pdf.c =================================================================== --- trunk/drivers/pdf.c 2010-07-27 22:10:33 UTC (rev 11109) +++ trunk/drivers/pdf.c 2010-07-27 22:24:16 UTC (rev 11110) @@ -287,8 +287,13 @@ if ( setjmp( env ) ) { - HPDF_Free( dev->pdf ); - plexit( "ERROR: ???\n" ); + // HPDF_Free segfaults after error so skip this nicety. + //HPDF_Free( dev->pdf ); + // can't call plexit because that appears to be circular via + // what happens with plend. Therefore, print out an error message + // and exit. + fprintf( stderr, "ERROR in haru library\n" ); + exit( 1 ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |