# HG changeset patch # User Sebastien Jodogne # Date 1721390435 -7200 # Node ID 61338585e7f7a8bcf05e1bbe23fe1d47a2fe8ba1 # Parent 4511251226923ef367f94a24708771ee9076fa8e# Parent 4dc0ea12d5374a400854ec0177f912c390b22a47 integration mainline->find-refactoring diff -r 451125122692 -r 61338585e7f7 Framework/Common/DatabaseManager.cpp --- a/Framework/Common/DatabaseManager.cpp Fri Jul 19 13:59:27 2024 +0200 +++ b/Framework/Common/DatabaseManager.cpp Fri Jul 19 14:00:35 2024 +0200 @@ -663,13 +663,11 @@ statement_.reset(GetManager().GetDatabase().Compile(*query)); assert(statement_.get() != NULL); + std::unique_ptr result(GetTransaction().Execute(*statement_, parameters)); + if (withResults) { - SetResult(GetTransaction().Execute(*statement_, parameters)); - } - else - { - GetTransaction().Execute(*statement_, parameters); + SetResult(result.release()); } } catch (Orthanc::OrthancException& e)