Revision: 34057 http://brlcad.svn.sourceforge.net/brlcad/?rev=34057&view=rev Author: bob1961 Date: 2009-03-19 16:46:39 +0000 (Thu, 19 Mar 2009)
Log Message: ----------- A slightly better mod to rt_res_pieces_clean() that skips uninitialized rt_piecestate structures. Modified Paths: -------------- brlcad/trunk/src/librt/shoot.c Modified: brlcad/trunk/src/librt/shoot.c =================================================================== --- brlcad/trunk/src/librt/shoot.c 2009-03-18 19:09:22 UTC (rev 34056) +++ brlcad/trunk/src/librt/shoot.c 2009-03-19 16:46:39 UTC (rev 34057) @@ -125,8 +125,9 @@ if (rtip) { for ( i = rtip->rti_nsolids_with_pieces-1; i >= 0; i-- ) { psp = &resp->re_pieces[i]; -#if 1 + /* + * Skip uninitialized structures. * Doing this until we figure out why all "struct rt_piecestate" array * members are NOT getting initialized in rt_res_pieces_init() above. * Initial glance looks like tree.c/rt_gettrees_muves() can be called @@ -135,11 +136,10 @@ * resp->re_pieces array. When this happens, it causes all but the * last referenced "struct rt_piecestate" member to be initialized. */ - if (psp->magic != RT_PIECESTATE_MAGIC) + if (psp->magic == 0) continue; -#else + RT_CK_PIECESTATE(psp); -#endif rt_htbl_free(&psp->htab); bu_bitv_free(psp->shot); psp->shot = NULL; /* sanity */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits