fix crash when saving a document after aborting a pending transaction
This commit is contained in:
@@ -2135,6 +2135,10 @@ void Document::_remObject(DocumentObject* pcObject)
|
||||
d->activeUndoTransaction->addObjectNew(pcObject);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// for a rollback delete the object
|
||||
signalTransactionRemove(*pcObject, 0);
|
||||
}
|
||||
|
||||
// remove from map
|
||||
d->objectMap.erase(pos);
|
||||
@@ -2145,6 +2149,11 @@ void Document::_remObject(DocumentObject* pcObject)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// for a rollback delete the object
|
||||
if (d->rollback) {
|
||||
delete pcObject;
|
||||
}
|
||||
}
|
||||
|
||||
void Document::breakDependency(DocumentObject* pcObject, bool clear)
|
||||
|
||||
Reference in New Issue
Block a user