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.
This commit is contained in:
John Ralls
2023-10-20 08:46:57 -07:00
parent 5669980589
commit 4592530318

View File

@@ -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);
}
}