mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
qof_instance_dispose should always complete dispose processes
If QofInstancePrivate has no collection then qof_instance_dispose() returns without completing the rest of its dispose processes, skipping removal of its type string from the string cache resulting in a reference count leak. Change the check for a collection so that it only affects the call to qof_collection_remove_entity().
This commit is contained in:
parent
0061e21c4f
commit
7a0ea190ca
@ -319,9 +319,8 @@ qof_instance_dispose (GObject *instp)
|
||||
QofInstance* inst = QOF_INSTANCE(instp);
|
||||
|
||||
priv = GET_PRIVATE(instp);
|
||||
if (!priv->collection)
|
||||
return;
|
||||
qof_collection_remove_entity(inst);
|
||||
if (priv->collection)
|
||||
qof_collection_remove_entity(inst);
|
||||
|
||||
CACHE_REMOVE(inst->e_type);
|
||||
inst->e_type = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user