Core: add a check on object deletion
This commit is contained in:
committed by
Chris Hennes
parent
948f284472
commit
ee34d09f7a
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user