Relax the check on whether xaccAccountGetCommodity is called with a

valid commodity.  This function is called from many places without
testing to see if the account is non-NULL.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15953 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2007-04-21 18:30:20 +00:00
parent 68adce5d1d
commit e1d77fb1d1

View File

@ -2849,7 +2849,8 @@ DxaccAccountGetCurrency (const Account *acc)
gnc_commodity *
xaccAccountGetCommodity (const Account *acc)
{
g_return_val_if_fail(GNC_IS_ACCOUNT(acc), NULL);
if (!GNC_IS_ACCOUNT(acc))
return NULL;
return GET_PRIVATE(acc)->commodity;
}