mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-20 04:28:24 -05:00
Following a series of signals after closing the DB the application reaches
SqliteTableModel::isEditable() which isn't prepared for closed databases.
Taking this into account fixes the crash.
This crash seems to have being introduced in 3da520cdd1
This commit is contained in:
@@ -913,7 +913,7 @@ void SqliteTableModel::setPseudoPk(const QString& pseudoPk)
|
||||
|
||||
bool SqliteTableModel::isEditable() const
|
||||
{
|
||||
return !m_sTable.isEmpty() && (m_db.getObjectByName(m_sTable)->type() == sqlb::Object::Types::Table || !m_pseudoPk.isEmpty());
|
||||
return !m_sTable.isEmpty() && m_db.isOpen() && (m_db.getObjectByName(m_sTable)->type() == sqlb::Object::Types::Table || !m_pseudoPk.isEmpty());
|
||||
}
|
||||
|
||||
void SqliteTableModel::triggerCacheLoad (int row) const
|
||||
|
||||
Reference in New Issue
Block a user