mirror of https://github.com/odrling/Aegisub
Fix a crash when deleting lines with audio open
This commit is contained in:
parent
a144ce8776
commit
02202cf7ab
|
@ -743,10 +743,10 @@ void AudioTimingControllerDialogue::RegenerateInactiveLines()
|
||||||
case 2: // Previous and next lines
|
case 2: // Previous and next lines
|
||||||
if (AssDialogue *line = context->selectionController->GetActiveLine())
|
if (AssDialogue *line = context->selectionController->GetActiveLine())
|
||||||
{
|
{
|
||||||
entryIter current_line = context->ass->Line.iterator_to(*line);
|
bool in_list = !EntryList::node_algorithms::inited(EntryList::value_traits::to_node_ptr(*line));
|
||||||
if (current_line == context->ass->Line.end())
|
if (!in_list)
|
||||||
break;
|
break;
|
||||||
|
entryIter current_line = context->ass->Line.iterator_to(*line);
|
||||||
entryIter prev = current_line;
|
entryIter prev = current_line;
|
||||||
while (--prev != context->ass->Line.begin() && !predicate(*prev)) ;
|
while (--prev != context->ass->Line.begin() && !predicate(*prev)) ;
|
||||||
if (prev != context->ass->Line.begin())
|
if (prev != context->ass->Line.begin())
|
||||||
|
|
Loading…
Reference in New Issue