[Brlcad-commits] CVS: brlcad/src/librt prep.c,14.12,14.13
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Sean M. <br...@us...> - 2006-01-16 08:34:08
|
Update of /cvsroot/brlcad/brlcad/src/librt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv983 Modified Files: prep.c Log Message: quell a warning after repeat calls to rt_clean() since the rti_nsol_by_type wasn't getting set to zero when the memory was released. now it checks for the zero param to bu_free and clears the nsol value. Index: prep.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/librt/prep.c,v retrieving revision 14.12 retrieving revision 14.13 diff -w -u -r14.12 -r14.13 --- prep.c 23 Oct 2005 04:44:36 -0000 14.12 +++ prep.c 16 Jan 2006 08:33:56 -0000 14.13 @@ -907,8 +907,11 @@ /* Free array of solid table pointers indexed by solid ID */ for( i=0; i <= ID_MAX_SOLID; i++ ) { if( rtip->rti_nsol_by_type[i] <= 0 ) continue; + if (rtip->rti_sol_by_type[i]) { bu_free( (char *)rtip->rti_sol_by_type[i], "sol_by_type" ); + } rtip->rti_sol_by_type[i] = (struct soltab **)0; + rtip->rti_nsol_by_type[i] = 0; } if( rtip->rti_Solids ) { bu_free( (char *)rtip->rti_Solids, "rtip->rti_Solids[]" ); |