mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
tablemodel: fix crash if rowdata couldn't be fetched
This commit is contained in:
@@ -321,10 +321,12 @@ bool SqliteTableModel::insertRows(int row, int count, const QModelIndex& parent)
|
||||
|
||||
// update column with default values
|
||||
QByteArrayList rowdata;
|
||||
m_db->getRow(m_sTable, rowid, rowdata);
|
||||
for(int j=1; j < m_headers.size(); ++j)
|
||||
if( m_db->getRow(m_sTable, rowid, rowdata) )
|
||||
{
|
||||
m_data[i].replace(j, rowdata[j - 1]);
|
||||
for(int j=1; j < m_headers.size(); ++j)
|
||||
{
|
||||
m_data[i].replace(j, rowdata[j - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user