diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp index d48e55f9e7c..7d7f727abb1 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; }