Sql: db close() failing isn't fatal

The assert was made fatal when looking at asserts for #5429 #5518
without having a particular problem in mind. Recent reports weakly
suggest that this might lead to occasional crashes for users when
sqlite_close fails in ways that look ignorable.
This commit is contained in:
Christian Kamm 2017-11-14 10:35:06 +01:00 committed by ckamm
parent 161f6baba6
commit 820ebf4b6e

View file

@ -184,8 +184,8 @@ void SqlDatabase::close()
{ {
if (_db) { if (_db) {
SQLITE_DO(sqlite3_close(_db)); SQLITE_DO(sqlite3_close(_db));
// Fatal because reopening an unclosed db might be problematic. if (_errId != SQLITE_OK)
ENFORCE(_errId == SQLITE_OK, "Error when closing DB"); qCWarning(lcSql) << "Closing database failed" << _error;
_db = 0; _db = 0;
} }
} }