mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
Fix crash when closing last opened tab
This commit is contained in:
parent
753b0185df
commit
9404c4dd70
|
@ -1009,7 +1009,9 @@ void MainWindow::tabCloseRequested( int x )
|
||||||
delete w;
|
delete w;
|
||||||
|
|
||||||
//activate a tab in accordance with MRU
|
//activate a tab in accordance with MRU
|
||||||
|
if ( mruList.size() > 0 ) {
|
||||||
ui.tabWidget->setCurrentWidget(mruList.at(0));
|
ui.tabWidget->setCurrentWidget(mruList.at(0));
|
||||||
|
}
|
||||||
|
|
||||||
// if everything is closed, add new tab
|
// if everything is closed, add new tab
|
||||||
if ( ui.tabWidget->count() == 0 )
|
if ( ui.tabWidget->count() == 0 )
|
||||||
|
|
Loading…
Reference in a new issue