From 41fb35f5cbce4d69010032ce2fb3c374c9b6d68c Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia granzuglia Date: Tue, 3 Aug 2010 06:40:49 +0000 Subject: [PATCH] removed compile time problems and crash --- src/meshlabplugins/filter_mls/mlsplugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meshlabplugins/filter_mls/mlsplugin.cpp b/src/meshlabplugins/filter_mls/mlsplugin.cpp index 82d4ac99d..5cba87640 100644 --- a/src/meshlabplugins/filter_mls/mlsplugin.cpp +++ b/src/meshlabplugins/filter_mls/mlsplugin.cpp @@ -402,7 +402,7 @@ bool MlsPlugin::applyFilter(QAction* filter, MeshDocument& md, RichParameterSet& { // clone the control mesh MeshModel* ref = par.getMesh("ControlMesh"); - pPoints = new MeshModel(); + pPoints = md.addNewMesh(""); pPoints->updateDataMask(ref); vcg::tri::Append::Mesh(pPoints->cm, ref->cm); // the last true means "copy all vertices" vcg::tri::UpdateBounding::Box(pPoints->cm); @@ -604,7 +604,7 @@ bool MlsPlugin::applyFilter(QAction* filter, MeshDocument& md, RichParameterSet& delete mls; if ( (id & _PROJECTION_) && par.getMesh("ControlMesh")!=pPoints) { - delete pPoints; + md.delMesh(pPoints); } if (mesh)