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;
//activate a tab in accordance with MRU
ui.tabWidget->setCurrentWidget(mruList.at(0));
if ( mruList.size() > 0 ) {
ui.tabWidget->setCurrentWidget(mruList.at(0));
}
// if everything is closed, add new tab
if ( ui.tabWidget->count() == 0 )