summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-28 06:06:44 +0100
committerRobin Gareus <robin@gareus.org>2020-02-28 06:06:44 +0100
commit4b28e4ee3ce622683b0c967d715116fb84441cc3 (patch)
treedfc9e585387bcd3d0dc02e293b69b6459bd825e8 /libs/pbd
parentbf3a36a126f646a8845bee4ba933e88b24a9c6e1 (diff)
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.
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/pbd/memento_command.h1
-rw-r--r--libs/pbd/stateful_diff_command.cc2
2 files changed, 0 insertions, 3 deletions
diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h
index 22b2d4a42d..72d0228b6c 100644
--- a/libs/pbd/pbd/memento_command.h
+++ b/libs/pbd/pbd/memento_command.h
@@ -120,7 +120,6 @@ public:
}
~MementoCommand () {
- drop_references ();
delete before;
delete after;
delete _binder;
diff --git a/libs/pbd/stateful_diff_command.cc b/libs/pbd/stateful_diff_command.cc
index 6236d6b53e..48ea675179 100644
--- a/libs/pbd/stateful_diff_command.cc
+++ b/libs/pbd/stateful_diff_command.cc
@@ -68,8 +68,6 @@ StatefulDiffCommand::StatefulDiffCommand (boost::shared_ptr<StatefulDestructible
StatefulDiffCommand::~StatefulDiffCommand ()
{
- drop_references ();
-
delete _changes;
}