From 4592530318d21c91d234c0921c6c11819232591a Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 20 Oct 2023 08:46:57 -0700 Subject: [PATCH] Bug 799099 - Crash when trying to get quotes The comment on gnc_pricedb_add_price says that writing to the GNCPrice* after calling it will produce interesting results, and calling gnc_price_commit_edit and g_object_unref both qualify, so remove those calls and the corresponding gnc_price_begin_edit. --- libgnucash/app-utils/gnc-quotes.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp index 19e846a192..d666a69b1e 100644 --- a/libgnucash/app-utils/gnc-quotes.cpp +++ b/libgnucash/app-utils/gnc-quotes.cpp @@ -790,10 +790,8 @@ GncQuotesImpl::create_quotes (const bpt::ptree& pt, const CommVec& comm_vec) auto price{parse_one_quote(pt, comm)}; if (!price) continue; - gnc_price_begin_edit (price); +// See the comment at gnc_pricedb_add_price gnc_pricedb_add_price(pricedb, price); - gnc_price_commit_edit(price); - gnc_price_unref (price); } }