gnucash maint: Revert "Use gnc_pricedb_has_prices instead of testing the return value of get_prices."

John Ralls jralls at code.gnucash.org
Tue Oct 27 19:03:49 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/f3de156e (commit)
	from  https://github.com/Gnucash/gnucash/commit/f5cf2ba5 (commit)



commit f3de156e65d04befb2dd08353c01940c186001a7
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Oct 27 14:08:59 2015 -0700

    Revert "Use gnc_pricedb_has_prices instead of testing the return value of get_prices."
    
    This reverts commit ae35dbb46407762c925346975588cd58fdb60ca3.
    because the return value was actually used later on.

diff --git a/src/gnome/dialog-commodities.c b/src/gnome/dialog-commodities.c
index 3f29a29..1a0e385 100644
--- a/src/gnome/dialog-commodities.c
+++ b/src/gnome/dialog-commodities.c
@@ -164,7 +164,8 @@ remove_clicked (CommoditiesDialog *cd)
     g_list_free (accounts);
 
     pdb = gnc_pricedb_get_db (cd->book);
-    if (gnc_pricedb_has_prices(pdb, commodity, NULL))
+    prices = gnc_pricedb_get_prices(pdb, commodity, NULL);
+    if (prices)
     {
         message = _("This commodity has price quotes. Are "
                     "you sure you want to delete the selected "



Summary of changes:
 src/gnome/dialog-commodities.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list