Commit e84437b0 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix crash on render/save when subtitle track was last active track.

CCBUG: 439355
parent 62901201
......@@ -982,6 +982,9 @@ bool ProjectManager::updateTimeline(int pos, int scrollPos)
int activeTrackPosition = m_project->getDocumentProperty(QStringLiteral("activeTrack"), QString::number( - 1)).toInt();
if (activeTrackPosition > -1 && activeTrackPosition < m_mainTimelineModel->getTracksCount()) {
pCore->window()->getMainTimeline()->controller()->setActiveTrack(m_mainTimelineModel->getTrackIndexFromPosition(activeTrackPosition));
} else {
// Subtitle model track was active
pCore->window()->getMainTimeline()->controller()->setActiveTrack(activeTrackPosition);
}
m_mainTimelineModel->setUndoStack(m_project->commandStack());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment