mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[account.cpp] prevent crash in gnc_account_get_currency_or_parent
if the *account argument is NULL, it is not reasonable to have a g_assert crash. Passing NULL account returns NULL commodity instead.
This commit is contained in:
parent
a59d91a94b
commit
ebb462d06d
@ -3271,7 +3271,7 @@ xaccAccountGetCommodity (const Account *acc)
|
||||
gnc_commodity * gnc_account_get_currency_or_parent(const Account* account)
|
||||
{
|
||||
gnc_commodity * commodity;
|
||||
g_assert(account);
|
||||
g_return_val_if_fail (account, NULL);
|
||||
|
||||
commodity = xaccAccountGetCommodity (account);
|
||||
if (gnc_commodity_is_currency(commodity))
|
||||
|
Loading…
Reference in New Issue
Block a user