mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
Merge branch 'maint'
This commit is contained in:
commit
83829e6513
@ -1332,6 +1332,12 @@ xaccFreeAccount (Account *acc)
|
||||
priv = GET_PRIVATE(acc);
|
||||
qof_event_gen (&acc->inst, QOF_EVENT_DESTROY, NULL);
|
||||
|
||||
/* Otherwise the lists below get munged while we're iterating
|
||||
* them, possibly crashing.
|
||||
*/
|
||||
if (!qof_instance_get_destroying (acc))
|
||||
qof_instance_set_destroying(acc, TRUE);
|
||||
|
||||
if (priv->children)
|
||||
{
|
||||
PERR (" instead of calling xaccFreeAccount(), please call\n"
|
||||
|
@ -2902,7 +2902,8 @@ static void
|
||||
xaccTransScrubGainsDate (Transaction *trans)
|
||||
{
|
||||
SplitList *node;
|
||||
for (node = trans->splits; node; node = node->next)
|
||||
SplitList *splits_copy = g_list_copy(trans->splits);
|
||||
for (node = splits_copy; node; node = node->next)
|
||||
{
|
||||
Split *s = node->data;
|
||||
|
||||
@ -2921,6 +2922,7 @@ xaccTransScrubGainsDate (Transaction *trans)
|
||||
FOR_EACH_SPLIT(trans, s->gains &= ~GAINS_STATUS_DATE_DIRTY);
|
||||
}
|
||||
}
|
||||
g_list_free(splits_copy);
|
||||
}
|
||||
|
||||
/* ============================================================== */
|
||||
|
@ -1415,6 +1415,9 @@ test_do_destroy (GainsFixture *fixture, gconstpointer pData)
|
||||
g_object_ref (base->txn);
|
||||
g_object_ref (fixture->gains_txn);
|
||||
|
||||
/* Protect against recursive calls to do_destroy from xaccTransCommitEdit */
|
||||
xaccTransBeginEdit(base->txn);
|
||||
|
||||
base->func->do_destroy (base->txn);
|
||||
g_assert_cmpint (test_signal_return_hits (sig), ==, 1);
|
||||
g_assert (base->txn->description == NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user