mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
Fix crash when trying to open non-existing table via command line
This fixes a crash when trying to open a table which does not exist via the -t/--table command line parameter. See issue #2180.
This commit is contained in:
@@ -582,7 +582,9 @@ void TableBrowser::reloadSettings()
|
||||
|
||||
void TableBrowser::setCurrentTable(const sqlb::ObjectIdentifier& name)
|
||||
{
|
||||
ui->comboBrowseTable->setCurrentIndex(ui->comboBrowseTable->findText(QString::fromStdString(name.toDisplayString())));
|
||||
int index = ui->comboBrowseTable->findText(QString::fromStdString(name.toDisplayString()));
|
||||
if(index != -1)
|
||||
ui->comboBrowseTable->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void TableBrowser::clear()
|
||||
|
||||
Reference in New Issue
Block a user