Fixed a memory leak that occurred when using undo/redo, fixes #330
Originally committed to SVN as r3007.
This commit is contained in:
parent
1d55e6b7b2
commit
614f2ef559
1 changed files with 2 additions and 0 deletions
|
@ -939,6 +939,7 @@ void AssFile::StackPop() {
|
|||
|
||||
if (StackModified) {
|
||||
undodesc=UndoStack.back()->undodescription;
|
||||
delete UndoStack.back();
|
||||
UndoStack.pop_back();
|
||||
StackModified = false;
|
||||
addcopy = true;
|
||||
|
@ -968,6 +969,7 @@ void AssFile::StackRedo() {
|
|||
|
||||
bool addcopy = false;
|
||||
if (StackModified) {
|
||||
delete UndoStack.back();
|
||||
UndoStack.pop_back();
|
||||
StackModified = false;
|
||||
addcopy = true;
|
||||
|
|
Loading…
Reference in a new issue