Skip to content

Commit

Permalink
Bug 799281 - Deleting a transaction may trigger a crash
Browse files Browse the repository at this point in the history
Update qof_collection_lookup_entity() to prevent returning instances marked to be destroyed.
  • Loading branch information
agwekixj authored Apr 12, 2024
1 parent a79c1dd commit 8d6f748
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libgnucash/engine/qofid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8d6f748

Please sign in to comment.