Fix some recursive undo removal

~StatefulDiffCommand() may trigger UndoTransaction::command_death()
which may delete the StatefulDiffCommand() that's just being destroyed.

This depends on the signal-connection order, which is undefined.
In any case when a shared_ptr<> object is being destroyed it means
that all references to it are already gone. There's no need to
emit drop_references from the d'tor.
This commit is contained in:
Robin Gareus 2020-02-28 06:06:44 +01:00
parent bf3a36a126
commit 4b28e4ee3c
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 0 additions and 3 deletions

View file

@ -120,7 +120,6 @@ public:
}
~MementoCommand () {
drop_references ();
delete before;
delete after;
delete _binder;

View file

@ -68,8 +68,6 @@ StatefulDiffCommand::StatefulDiffCommand (boost::shared_ptr<StatefulDestructible
StatefulDiffCommand::~StatefulDiffCommand ()
{
drop_references ();
delete _changes;
}