forked from mia/Aegisub
Fix memory leak when deleting or cutting rows
Originally committed to SVN as r6045.
This commit is contained in:
parent
79fa487678
commit
ed51e7b668
1 changed files with 1 additions and 0 deletions
|
@ -310,6 +310,7 @@ void SubtitlesGrid::DeleteLines(wxArrayInt target, bool flagModified) {
|
|||
size_t deleted = 0;
|
||||
for (entryIter cur = context->ass->Line.begin(); cur != context->ass->Line.end();) {
|
||||
if (dynamic_cast<AssDialogue*>(*cur) && ++row == target[deleted]) {
|
||||
delete *cur;
|
||||
cur = context->ass->Line.erase(cur);
|
||||
++deleted;
|
||||
if (deleted == target.size()) break;
|
||||
|
|
Loading…
Reference in a new issue