mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-23 01:16:43 -06:00
Don't leak a GNCPrice after fetching prices from finance-quote.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22644 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1116226aaa
commit
366411853d
@ -1680,11 +1680,15 @@ gnc_xfer_dialog_fetch (GtkButton *button, XferDialog *xferData)
|
||||
scm_call_2 (quotes_func, scm_window, book_scm);
|
||||
gnc_unset_busy_cursor (NULL);
|
||||
|
||||
/*the results should be in the price db now */
|
||||
/*the results should be in the price db now, but don't crash if not. */
|
||||
|
||||
prc = gnc_pricedb_lookup_latest(xferData->pricedb, from, to);
|
||||
rate = gnc_price_get_value (prc);
|
||||
gnc_amount_edit_set_amount(GNC_AMOUNT_EDIT(xferData->price_edit), rate);
|
||||
if (prc)
|
||||
{
|
||||
rate = gnc_price_get_value (prc);
|
||||
gnc_amount_edit_set_amount(GNC_AMOUNT_EDIT(xferData->price_edit), rate);
|
||||
gnc_price_unref (prc);
|
||||
}
|
||||
|
||||
LEAVE("quote retrieved");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user