mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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); */
|
||||
|
||||
Reference in New Issue
Block a user