Revision: 71587 http://sourceforge.net/p/brlcad/code/71587 Author: starseeker Date: 2018-08-27 18:11:18 +0000 (Mon, 27 Aug 2018) Log Message: ----------- check, then free
Modified Paths: -------------- brlcad/trunk/src/libged/facetize.c Modified: brlcad/trunk/src/libged/facetize.c =================================================================== --- brlcad/trunk/src/libged/facetize.c 2018-08-27 17:49:38 UTC (rev 71586) +++ brlcad/trunk/src/libged/facetize.c 2018-08-27 18:11:18 UTC (rev 71587) @@ -1063,12 +1063,15 @@ } ged_facetize_continuation_memfree: - if (free_pnts) { - struct pnt_normal *entry; + if (free_pnts && pnts) { struct pnt_normal *rpnt = (struct pnt_normal *)pnts->point; - while (BU_LIST_WHILE(entry, pnt_normal, &(rpnt->l))) { - BU_LIST_DEQUEUE(&(entry->l)); - BU_PUT(entry, struct pnt_normal); + if (rpnt) { + struct pnt_normal *entry; + while (BU_LIST_WHILE(entry, pnt_normal, &(rpnt->l))) { + BU_LIST_DEQUEUE(&(entry->l)); + BU_PUT(entry, struct pnt_normal); + } + BU_PUT(rpnt, struct pnt_normal); } bu_free(pnts, "free pnts"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits