Skip to content

Commit

Permalink
mainwindow: fixes crash when loading a successive video
Browse files Browse the repository at this point in the history
currentSubId and currentSecSubId were not reset to 0 (none) in
clearTracks(), leading to out of bounds array accesses when loading
a new video.
  • Loading branch information
ripose-jp committed Jul 2, 2021
1 parent 2517037 commit 60b409c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ void MainWindow::clearTracks()
m_ui->actionSubtitleTwoNone
);
m_actionGroups.actionMap.clear();
m_actionGroups.currentSubId = 0;
m_actionGroups.currentSecSubId = 0;
}

void MainWindow::setTracks(QList<const Track *> tracks)
Expand Down

0 comments on commit 60b409c

Please sign in to comment.