mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
68adce5d1d
commit
e1d77fb1d1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user