diff --git a/src/meshlab/glarea.h b/src/meshlab/glarea.h index 8b4cab0ad..11859acc7 100644 --- a/src/meshlab/glarea.h +++ b/src/meshlab/glarea.h @@ -309,12 +309,14 @@ public slots: { MeshModel *m = md()->getMesh(i.key()); - foreach(QAction *p, i.value()) - { - DecoratePlugin * decorInterface = qobject_cast(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(p->parent()); + decorInterface->endDecorate(p, *m, this->glas.currentGlobalParamSet, this); + decorInterface->setLog(&md()->Log); + decorInterface->startDecorate(p, *m, this->glas.currentGlobalParamSet, this); + } } }