Skip to content

Commit

Permalink
Addendum 5c5b627: handle blank split with null account
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Oct 1, 2024
1 parent 24fdeca commit 292adf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gnucash/register/ledger-core/split-register-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 292adf6

Please sign in to comment.