mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
fix a crash with browsing VIRTUAL tables, that we can't query
This commit is contained in:
@@ -193,7 +193,13 @@ QVariant SqliteTableModel::headerData(int section, Qt::Orientation orientation,
|
||||
return QVariant();
|
||||
|
||||
if (orientation == Qt::Horizontal)
|
||||
return m_headers.at(section);
|
||||
{
|
||||
// if we have a VIRTUAL table the model will not be valid, with no header data
|
||||
if(section < m_headers.size())
|
||||
return m_headers.at(section);
|
||||
|
||||
return QString("%1").arg(section + 1);
|
||||
}
|
||||
else
|
||||
return QString("%1").arg(section + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user