Fix null pointer dereference in gnc_split_register_save_to_copy_buffer()

If the "transfer" cell has been changed while cutting or copying a split
then it'll dereference the NULL "ft" value.

Check that "ft" is not NULL. This is equivalent to the original behaviour
before cb273b13a1 when the number of splits
would have been determined to be 0 for the SCM_UNDEFINED value of
"trans_scm".
pull/1684/head
Simon Arlott 3 years ago
parent 57ca13515d
commit 1e1e922081
No known key found for this signature in database
GPG Key ID: DF001BFD83E75990

@ -1593,7 +1593,7 @@ gnc_split_register_save_to_copy_buffer (SplitRegister *reg,
if (!other_fs)
{
if (g_list_length (ft->m_splits) == 1)
if (ft && g_list_length (ft->m_splits) == 1)
{
Split* temp_split;

Loading…
Cancel
Save