Skip to content

Commit

Permalink
Bug 799449 - Save As... sequence from SQL to XML format does not...
Browse files Browse the repository at this point in the history
clear lock on the origin SQL book.

GncDbiSqlConnection::unlock_database function errored out if the last
dbi interaction resulted in an error, even if it was a harmless index
out of range. Ignore index out of range errors.
  • Loading branch information
jralls committed Dec 23, 2024
1 parent bda17ff commit c549e20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libgnucash/backend/dbi/gnc-dbisqlconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ GncDbiSqlConnection::unlock_database ()
{
if (m_conn == nullptr) return;
if (m_readonly) return;
g_return_if_fail (dbi_conn_error (m_conn, nullptr) == 0);
auto dbi_error{dbi_conn_error (m_conn, nullptr)};
g_return_if_fail (dbi_error == DBI_ERROR_NONE || dbi_error == DBI_ERROR_BADIDX);

auto tables = m_provider->get_table_list (m_conn, lock_table);
if (tables.empty())
Expand Down

0 comments on commit c549e20

Please sign in to comment.