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) {
|
if (StackModified) {
|
||||||
undodesc=UndoStack.back()->undodescription;
|
undodesc=UndoStack.back()->undodescription;
|
||||||
|
delete UndoStack.back();
|
||||||
UndoStack.pop_back();
|
UndoStack.pop_back();
|
||||||
StackModified = false;
|
StackModified = false;
|
||||||
addcopy = true;
|
addcopy = true;
|
||||||
|
@ -968,6 +969,7 @@ void AssFile::StackRedo() {
|
||||||
|
|
||||||
bool addcopy = false;
|
bool addcopy = false;
|
||||||
if (StackModified) {
|
if (StackModified) {
|
||||||
|
delete UndoStack.back();
|
||||||
UndoStack.pop_back();
|
UndoStack.pop_back();
|
||||||
StackModified = false;
|
StackModified = false;
|
||||||
addcopy = true;
|
addcopy = true;
|
||||||
|
|
Loading…
Reference in New Issue