mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 13:55:47 +03:00
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:
parent
161f6baba6
commit
820ebf4b6e
1 changed files with 2 additions and 2 deletions
|
@ -184,8 +184,8 @@ void SqlDatabase::close()
|
|||
{
|
||||
if (_db) {
|
||||
SQLITE_DO(sqlite3_close(_db));
|
||||
// Fatal because reopening an unclosed db might be problematic.
|
||||
ENFORCE(_errId == SQLITE_OK, "Error when closing DB");
|
||||
if (_errId != SQLITE_OK)
|
||||
qCWarning(lcSql) << "Closing database failed" << _error;
|
||||
_db = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue