Core: add a check on object deletion

This commit is contained in:
Florian Foinant-Willig
2025-11-06 15:22:06 +01:00
committed by Chris Hennes
parent 948f284472
commit ee34d09f7a

View File

@@ -3221,6 +3221,10 @@ bool Document::containsObject(const DocumentObject* pcObject) const
void Document::removeObject(const char* sName)
{
auto pos = d->objectMap.find(sName);
if (pos == d->objectMap.end()){
FC_MSG("Object " << sName << " already deleted in document " << getName());
return;
}
if (pos->second->testStatus(ObjectStatus::PendingRecompute)) {
// TODO: shall we allow removal if there is active undo transaction?