Addendum 5c5b627cb1: handle blank split with null account

This commit is contained in:
Christopher Lam committed 2024-10-02 05:50:28 +08:00
1 parent 24fdecaca7
commit 292adf69d8
1 file changed
+2 -1
@@ -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