Remove lot from account while deleting the lot

There was no way the account was informed about the lot being deleted.
This was resulting into invalid lot lists in an account while scrubbing.
Which would bomb at later stages like when re-running check & repair or
opening the lot viewer. Also saving would report a number of critical messages
about invalid objects, but these didn't result in a segfault.
This commit is contained in:
Geert Janssens
2016-11-09 18:41:05 +01:00
parent 32c4d14588
commit 673888dee7

View File

@@ -227,6 +227,9 @@ gnc_lot_free(GNCLot* lot)
}
g_list_free (priv->splits);
if (priv->account)
xaccAccountRemoveLot (priv->account, lot);
priv->account = NULL;
priv->is_closed = TRUE;
/* qof_instance_release (&lot->inst); */