fix crash on exit

This commit is contained in:
David Rose 2005-10-06 00:16:24 +00:00
parent ce4e89c475
commit c4b11604ec
2 changed files with 13 additions and 0 deletions

View File

@ -78,9 +78,16 @@ SoftNodeDesc(SoftNodeDesc *parent, const string &name) :
////////////////////////////////////////////////////////////////////
SoftNodeDesc::
~SoftNodeDesc() {
// I think it is a mistake to try to delete this. This was one
// member of an entire array allocated at once; you can't delete
// individual elements of an array.
// Screw cleanup, anyway--we'll just let the array leak.
/*
if (_model != (SAA_Elem *)NULL) {
delete _model;
}
*/
}
////////////////////////////////////////////////////////////////////

View File

@ -572,6 +572,7 @@ convert_file(const Filename &filename) {
////////////////////////////////////////////////////////////////////
bool SoftToEggConverter::
convert_soft(bool from_selection) {
cerr <<" startup\n";
bool all_ok = true;
_from_selection = from_selection;
@ -629,13 +630,18 @@ convert_soft(bool from_selection) {
softegg_cat.info() << "Converted Softimage file\n";
// write out the egg model file
cerr << "writing egg file\n";
_egg_data->write_egg(output_filename);
softegg_cat.info() << "Wrote Egg file " << output_filename << endl;
cerr <<" done\n";
}
if (make_anim) {
cerr << "making anim\n";
if (!convert_char_chan()) {
cerr << "failed to convert char\n";
all_ok = false;
}
cerr << "done convert_char_chan\n";
// reparent_decals(get_egg_data());
softegg_cat.info() << "Converted Softimage file\n";