Fix crash when closing last opened tab

This commit is contained in:
Julian Depetris Chauvin 2012-03-26 22:38:41 -03:00
parent 753b0185df
commit 9404c4dd70

View file

@ -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 )