Bug 799281 - Deleting a transaction may trigger a crash

Update qof_collection_lookup_entity() to prevent returning instances marked to be destroyed.
This commit is contained in:
Sherlock
2024-04-12 15:34:14 -07:00
committed by GitHub
parent a79c1dd3ce
commit 8d6f748aca

View File

@@ -216,6 +216,7 @@ qof_collection_lookup_entity (const QofCollection *col, const GncGUID * guid)
if (guid == NULL) return NULL;
ent = static_cast<QofInstance*>(g_hash_table_lookup (col->hash_of_entities,
guid));
if (qof_instance_get_destroying(ent)) return NULL;
return ent;
}