mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Fix potential crash on exit with multiple tabs opened
This commit is contained in:
parent
a3927bdc7b
commit
a510facf18
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue