mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798899 - Gnucash crashes during CSV import when using a template if the destination account is changed from one used in the template
This commit is contained in:
parent
43eb36c311
commit
84b64233d7
@ -411,10 +411,10 @@ void GncPreSplit::UpdateCrossSplitCounters ()
|
|||||||
curr = gnc_account_get_currency_or_parent (acct);
|
curr = gnc_account_get_currency_or_parent (acct);
|
||||||
|
|
||||||
auto has_curr = [curr] (const gnc_commodity *vec_curr) { return gnc_commodity_equiv (curr, vec_curr); };
|
auto has_curr = [curr] (const gnc_commodity *vec_curr) { return gnc_commodity_equiv (curr, vec_curr); };
|
||||||
if (curr && std::none_of (alt_currs.cbegin(), alt_currs.cbegin(), has_curr))
|
if (curr && std::none_of (alt_currs.cbegin(), alt_currs.cend(), has_curr))
|
||||||
m_pre_trans->m_alt_currencies.push_back(curr);
|
m_pre_trans->m_alt_currencies.push_back(curr);
|
||||||
auto has_comm = [comm] (const gnc_commodity *vec_comm) { return gnc_commodity_equiv (comm, vec_comm); };
|
auto has_comm = [comm] (const gnc_commodity *vec_comm) { return gnc_commodity_equiv (comm, vec_comm); };
|
||||||
if (comm && std::none_of (acct_comms.cbegin(), acct_comms.cbegin(), has_comm))
|
if (comm && std::none_of (acct_comms.cbegin(), acct_comms.cend(), has_comm))
|
||||||
m_pre_trans->m_alt_currencies.push_back(comm);
|
m_pre_trans->m_alt_currencies.push_back(comm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user