Fix double free of undo commands (amend 9e6435ff14)

This fixes a case when deleting a plugin, deletes all automation
undo/redo events:
  <UndoTransaction name="add automation event">
    <MementoCommand type-name="ARDOUR::AutomationList">
   ...


`delete this;` calls the d'tor which emits drop_references(),
that leads to UndoTransaction::command_death() destroying the
object, whichh causes a double free.
This commit is contained in:
Robin Gareus 2020-02-28 02:09:58 +01:00
parent 54911a0ee2
commit 73c5bdd3cb
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -127,7 +127,8 @@ public:
}
void binder_dying () {
delete this;
/* delegate to UndoTransaction::command_death */
drop_references ();
}
void operator() () {