Revision: 45877
http://brlcad.svn.sourceforge.net/brlcad/?rev=45877&view=rev
Author: brlcad
Date: 2011-08-10 04:48:09 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
turns out, wdb_put_internal() has similar delusional notions to the mk_*()
functions assuming memory is dynamic and ready to be released. since we have
stack objects, that's bad. fortunately, it skips the free if idb_meth isn't
set, so try to pull a fast one.
Modified Paths:
--------------
brlcad/trunk/src/proc-db/csgbrep.cpp
Modified: brlcad/trunk/src/proc-db/csgbrep.cpp
===================================================================
--- brlcad/trunk/src/proc-db/csgbrep.cpp 2011-08-10 04:40:27 UTC (rev
45876)
+++ brlcad/trunk/src/proc-db/csgbrep.cpp 2011-08-10 04:48:09 UTC (rev
45877)
@@ -54,14 +54,15 @@
if (!fp || !ip || !name)
return;
- /* write the object in implicit form */
- wdb_put_internal(fp, name, ip, 1.0);
-
/* write the object in brep/nurbs form */
brep = ON_Brep::New();
ip->idb_meth->ft_brep(&brep, ip, tol);
mk_brep(fp, bname.c_str(), brep);
// delete brep;
+
+ /* write the object in implicit form */
+ ip->idb_meth = NULL; /* so we don't call ifree */
+ wdb_put_internal(fp, name, ip, 1.0);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits