mirror of https://github.com/odrling/Aegisub
Fixed a memory leak that occurred when using undo/redo, fixes #330
Originally committed to SVN as r3007.
This commit is contained in:
parent
5c89ff4a50
commit
016ed435b1
|
@ -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 New Issue