From 60b409c7eadeed1197a580f67d63291813d6af8d Mon Sep 17 00:00:00 2001 From: Ripose Date: Fri, 2 Jul 2021 00:00:33 -0700 Subject: [PATCH] mainwindow: fixes crash when loading a successive video currentSubId and currentSecSubId were not reset to 0 (none) in clearTracks(), leading to out of bounds array accesses when loading a new video. --- src/gui/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 4b8608eb..b01e1256 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -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 tracks)