mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Fix crash when searching in an empty table
This commit is contained in:
@@ -1080,6 +1080,10 @@ QModelIndex SqliteTableModel::nextMatch(const QModelIndex& start, const std::vec
|
||||
// Wait until the row count is there
|
||||
waitUntilIdle();
|
||||
|
||||
// Stop right away if there is no data in the table
|
||||
if(rowCount() == 0)
|
||||
return QModelIndex();
|
||||
|
||||
// Make sure the start position starts in a column from the list of columns to search in
|
||||
QModelIndex pos = start;
|
||||
if(std::find(column_list.begin(), column_list.end(), pos.column()) == column_list.end())
|
||||
|
||||
Reference in New Issue
Block a user