Fix potential crash on exit with multiple tabs opened

This commit is contained in:
Timon Wong 2013-05-29 14:17:12 +08:00
parent a3927bdc7b
commit a510facf18

View file

@ -1544,7 +1544,9 @@ void MainWindow::tabSwitched( int )
updateWindowTitle();
if (mruList.size() > 1)
{
mruList.move(mruList.indexOf(ui.tabWidget->widget(ui.tabWidget->currentIndex())),0);
int from = mruList.indexOf( ui.tabWidget->widget( ui.tabWidget->currentIndex() ) );
if ( from > 0)
mruList.move( from, 0 );
}
}