Mesh: catch exceptions in destructor

This commit is contained in:
Chris Hennes
2025-03-23 13:25:53 -05:00
committed by Benjamin Nauck
parent b6924ff744
commit 59bfee2cfe

View File

@@ -126,10 +126,23 @@ ViewProviderMeshCurvature::ViewProviderMeshCurvature()
ViewProviderMeshCurvature::~ViewProviderMeshCurvature()
{
pcColorRoot->unref();
pcColorMat->unref();
deleteColorBar();
pcLinkRoot->unref();
try {
pcColorRoot->unref();
pcColorMat->unref();
pcLinkRoot->unref();
deleteColorBar();
}
catch (Base::Exception& e) {
Base::Console().DestructorError(
"ViewProviderMeshCurvature",
"ViewProviderMeshCurvature::deleteColorBar() threw an exception: %s\n",
e.what());
}
catch (...) {
Base::Console().DestructorError(
"ViewProviderInspection",
"ViewProviderInspection destructor threw an unknown exception");
}
}
void ViewProviderMeshCurvature::onChanged(const App::Property* prop)