mirror of https://github.com/odrling/Aegisub
Fix potential crash when deleting lines with audio open
Don't assume that the active line is valid in RegenerateInactiveLines, as it may get called by the commit signal before the selection is updated when the active line is deleted. Closes #1502. Originally committed to SVN as r6932.
This commit is contained in:
parent
5162c28684
commit
60c38bd2e5
|
@ -736,6 +736,8 @@ void AudioTimingControllerDialogue::RegenerateInactiveLines()
|
|||
{
|
||||
std::list<AssEntry*>::iterator current_line =
|
||||
find(context->ass->Line.begin(), context->ass->Line.end(), line);
|
||||
if (current_line == context->ass->Line.end())
|
||||
break;
|
||||
|
||||
std::list<AssEntry*>::iterator prev = current_line;
|
||||
while (--prev != context->ass->Line.begin() && !predicate(*prev)) ;
|
||||
|
|
Loading…
Reference in New Issue