fix crash when delete mesh with active decorator

This commit is contained in:
alemuntoni 2021-11-16 10:13:03 +01:00
parent 6097c7f11e
commit f1a399b223

View File

@ -309,12 +309,14 @@ public slots:
{
MeshModel *m = md()->getMesh(i.key());
foreach(QAction *p, i.value())
{
DecoratePlugin * decorInterface = qobject_cast<DecoratePlugin *>(p->parent());
decorInterface->endDecorate(p, *m, this->glas.currentGlobalParamSet, this);
decorInterface->setLog(&md()->Log);
decorInterface->startDecorate(p, *m, this->glas.currentGlobalParamSet, this);
if (m != nullptr) {
foreach(QAction *p, i.value())
{
DecoratePlugin * decorInterface = qobject_cast<DecoratePlugin *>(p->parent());
decorInterface->endDecorate(p, *m, this->glas.currentGlobalParamSet, this);
decorInterface->setLog(&md()->Log);
decorInterface->startDecorate(p, *m, this->glas.currentGlobalParamSet, this);
}
}
}