Crash when browsing a table, deleting it and back to the data browser

Following these steps a crash was observed:
1. Browse a Table T in "Browse Data" tab
2. Change to "Database Structure" tab and delete table T
3. Return to "Browse Data" tab

The application crashed because the combo still had the deleted table
value. It was too soon for the updateInsertDeleteRecordButton() call.
Moving it to the end of the method solves the issue.
This commit is contained in:
mgrojo
2018-07-29 14:27:28 +02:00
parent e1ef492d78
commit 2701223aac

View File

@@ -525,8 +525,6 @@ void MainWindow::populateTable()
updateInsertDeleteRecordButton();
});
}
updateInsertDeleteRecordButton();
// Search stored table settings for this table
bool storedDataFound = browseTableSettings.contains(tablename);
@@ -637,6 +635,8 @@ void MainWindow::populateTable()
ui->actionShowRowidColumn->setVisible(false);
}
updateInsertDeleteRecordButton();
QApplication::restoreOverrideCursor();
}