summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/pbd/undo.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/pbd/undo.cc b/libs/pbd/undo.cc
index fd7c4d5fb8..c5c1cb238a 100644
--- a/libs/pbd/undo.cc
+++ b/libs/pbd/undo.cc
@@ -295,6 +295,9 @@ void
UndoHistory::clear_redo ()
{
_clearing = true;
+ for (std::list<UndoTransaction*>::iterator i = RedoList.begin(); i != RedoList.end(); ++i) {
+ delete *i;
+ }
RedoList.clear ();
_clearing = false;
@@ -306,6 +309,9 @@ void
UndoHistory::clear_undo ()
{
_clearing = true;
+ for (std::list<UndoTransaction*>::iterator i = UndoList.begin(); i != UndoList.end(); ++i) {
+ delete *i;
+ }
UndoList.clear ();
_clearing = false;