Bug #478106: Add sanity check to currency exchange dialog.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18065 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Charles Day 2009-05-01 23:04:27 +00:00
parent 2979c970bb
commit 914fd9730c

View File

@ -2144,6 +2144,8 @@ gboolean gnc_xfer_dialog_run_exchange_dialog(
gnc_commodity *txn_cur = xaccTransGetCurrency(txn); gnc_commodity *txn_cur = xaccTransGetCurrency(txn);
gnc_commodity *reg_com = xaccAccountGetCommodity(reg_acc); gnc_commodity *reg_com = xaccAccountGetCommodity(reg_acc);
g_return_val_if_fail(txn_cur, TRUE);
/* We know that "amount" is always in the reg_com currency. /* We know that "amount" is always in the reg_com currency.
* Unfortunately it is possible that neither xfer_com or txn_cur are * Unfortunately it is possible that neither xfer_com or txn_cur are
* the same as reg_com, in which case we need to convert to the txn * the same as reg_com, in which case we need to convert to the txn