From 8d6f748aca103095e8451a88d1b59ea410bceaf6 Mon Sep 17 00:00:00 2001 From: Sherlock <119709043+agwekixj@users.noreply.github.com> Date: Fri, 12 Apr 2024 15:34:14 -0700 Subject: [PATCH] Bug 799281 - Deleting a transaction may trigger a crash Update qof_collection_lookup_entity() to prevent returning instances marked to be destroyed. --- libgnucash/engine/qofid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp index d48e55f9e7..7d7f727abb 100644 --- a/libgnucash/engine/qofid.cpp +++ b/libgnucash/engine/qofid.cpp @@ -216,6 +216,7 @@ qof_collection_lookup_entity (const QofCollection *col, const GncGUID * guid) if (guid == NULL) return NULL; ent = static_cast(g_hash_table_lookup (col->hash_of_entities, guid)); + if (qof_instance_get_destroying(ent)) return NULL; return ent; }