Addendum 5c5b627cb1: handle blank split with null account

This commit is contained in:
Christopher Lam 2024-10-02 05:50:05 +08:00
parent 24fdecaca7
commit 292adf69d8

View File

@ -374,7 +374,8 @@ gnc_split_register_check_account (SplitRegister *reg,
static inline bool
is_trading_split (Split* split)
{
return xaccAccountGetType (xaccSplitGetAccount (split)) == ACCT_TYPE_TRADING;
auto acct{xaccSplitGetAccount (split)};
return GNC_IS_ACCOUNT (acct) && xaccAccountGetType (acct) == ACCT_TYPE_TRADING;
}
static void